aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist_client.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_client.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c
index c2e8f5d88..b377f2041 100644
--- a/src/hostlist/gnunet-daemon-hostlist_client.c
+++ b/src/hostlist/gnunet-daemon-hostlist_client.c
@@ -540,12 +540,12 @@ download_get_url ()
540 { \ 540 { \
541 ret = curl_easy_setopt (c, a, b); \ 541 ret = curl_easy_setopt (c, a, b); \
542 if (CURLE_OK != ret) \ 542 if (CURLE_OK != ret) \
543 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ 543 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \
544 _ ("%s failed at %s:%d: `%s'\n"), \ 544 _ ("%s failed at %s:%d: `%s'\n"), \
545 "curl_easy_setopt", \ 545 "curl_easy_setopt", \
546 __FILE__, \ 546 __FILE__, \
547 __LINE__, \ 547 __LINE__, \
548 curl_easy_strerror (ret)); \ 548 curl_easy_strerror (ret)); \
549 } while (0) 549 } while (0)
550 550
551 551
@@ -790,7 +790,7 @@ clean_up ()
790 curl_easy_cleanup (curl); 790 curl_easy_cleanup (curl);
791 curl = NULL; 791 curl = NULL;
792 } 792 }
793 GNUNET_free_non_null (current_url); 793 GNUNET_free (current_url);
794 current_url = NULL; 794 current_url = NULL;
795 stat_bytes_downloaded = 0; 795 stat_bytes_downloaded = 0;
796 stat_download_in_progress = GNUNET_NO; 796 stat_download_in_progress = GNUNET_NO;
@@ -1418,11 +1418,12 @@ load_hostlist_file ()
1418 1418
1419 counter = 0; 1419 counter = 0;
1420 struct GNUNET_BIO_ReadSpec rs[] = { 1420 struct GNUNET_BIO_ReadSpec rs[] = {
1421 GNUNET_BIO_read_spec_int32 ("times used", (int32_t *)&times_used), 1421 GNUNET_BIO_read_spec_int32 ("times used", (int32_t *) &times_used),
1422 GNUNET_BIO_read_spec_int64 ("quality", (int64_t *) &quality), 1422 GNUNET_BIO_read_spec_int64 ("quality", (int64_t *) &quality),
1423 GNUNET_BIO_read_spec_int64 ("last used", (int64_t *) &last_used), 1423 GNUNET_BIO_read_spec_int64 ("last used", (int64_t *) &last_used),
1424 GNUNET_BIO_read_spec_int64 ("created", (int64_t *) &created), 1424 GNUNET_BIO_read_spec_int64 ("created", (int64_t *) &created),
1425 GNUNET_BIO_read_spec_int32 ("hellos returned", (int32_t *) &hellos_returned), 1425 GNUNET_BIO_read_spec_int32 ("hellos returned",
1426 (int32_t *) &hellos_returned),
1426 GNUNET_BIO_read_spec_end (), 1427 GNUNET_BIO_read_spec_end (),
1427 }; 1428 };
1428 while ((GNUNET_OK == GNUNET_BIO_read_string (rh, "url", &uri, MAX_URL_LEN)) && 1429 while ((GNUNET_OK == GNUNET_BIO_read_string (rh, "url", &uri, MAX_URL_LEN)) &&
@@ -1460,7 +1461,7 @@ load_hostlist_file ()
1460 linked_list_size, 1461 linked_list_size,
1461 GNUNET_NO); 1462 GNUNET_NO);
1462 1463
1463 GNUNET_free_non_null (uri); 1464 GNUNET_free (uri);
1464 emsg = NULL; 1465 emsg = NULL;
1465 (void) GNUNET_BIO_read_close (rh, &emsg); 1466 (void) GNUNET_BIO_read_close (rh, &emsg);
1466 if (emsg != NULL) 1467 if (emsg != NULL)
@@ -1527,7 +1528,8 @@ save_hostlist_file (int shutdown)
1527 { 1528 {
1528 struct GNUNET_BIO_WriteSpec ws[] = { 1529 struct GNUNET_BIO_WriteSpec ws[] = {
1529 GNUNET_BIO_write_spec_string ("hostlist uri", pos->hostlist_uri), 1530 GNUNET_BIO_write_spec_string ("hostlist uri", pos->hostlist_uri),
1530 GNUNET_BIO_write_spec_int32 ("times used", (int32_t *) &pos->times_used), 1531 GNUNET_BIO_write_spec_int32 ("times used",
1532 (int32_t *) &pos->times_used),
1531 GNUNET_BIO_write_spec_int64 ("quality", (int64_t *) &pos->quality), 1533 GNUNET_BIO_write_spec_int64 ("quality", (int64_t *) &pos->quality),
1532 GNUNET_BIO_write_spec_int64 ( 1534 GNUNET_BIO_write_spec_int64 (
1533 "last usage", 1535 "last usage",
@@ -1657,15 +1659,15 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
1657 GNUNET_free (proxytype_str); 1659 GNUNET_free (proxytype_str);
1658 GNUNET_free (proxy); 1660 GNUNET_free (proxy);
1659 proxy = NULL; 1661 proxy = NULL;
1660 GNUNET_free_non_null (proxy_username); 1662 GNUNET_free (proxy_username);
1661 proxy_username = NULL; 1663 proxy_username = NULL;
1662 GNUNET_free_non_null (proxy_password); 1664 GNUNET_free (proxy_password);
1663 proxy_password = NULL; 1665 proxy_password = NULL;
1664 1666
1665 return GNUNET_SYSERR; 1667 return GNUNET_SYSERR;
1666 } 1668 }
1667 } 1669 }
1668 GNUNET_free_non_null (proxytype_str); 1670 GNUNET_free (proxytype_str);
1669 } 1671 }
1670 1672
1671 stat_learning = learn; 1673 stat_learning = learn;
@@ -1786,11 +1788,11 @@ GNUNET_HOSTLIST_client_stop ()
1786 ti_check_download = NULL; 1788 ti_check_download = NULL;
1787 curl_global_cleanup (); 1789 curl_global_cleanup ();
1788 } 1790 }
1789 GNUNET_free_non_null (proxy); 1791 GNUNET_free (proxy);
1790 proxy = NULL; 1792 proxy = NULL;
1791 GNUNET_free_non_null (proxy_username); 1793 GNUNET_free (proxy_username);
1792 proxy_username = NULL; 1794 proxy_username = NULL;
1793 GNUNET_free_non_null (proxy_password); 1795 GNUNET_free (proxy_password);
1794 proxy_password = NULL; 1796 proxy_password = NULL;
1795 if (NULL != pi) 1797 if (NULL != pi)
1796 { 1798 {