diff options
Diffstat (limited to 'src/hostlist')
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist_client.c | 36 | ||||
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist_server.c | 6 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist.c | 4 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 9 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | 4 |
5 files changed, 31 insertions, 28 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 *)×_used), | 1421 | GNUNET_BIO_read_spec_int32 ("times used", (int32_t *) ×_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 | { |
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c index 999730e3e..b6c0495c0 100644 --- a/src/hostlist/gnunet-daemon-hostlist_server.c +++ b/src/hostlist/gnunet-daemon-hostlist_server.c | |||
@@ -229,7 +229,7 @@ host_processor (void *cls, | |||
229 | { | 229 | { |
230 | GNUNET_assert (NULL == peer); | 230 | GNUNET_assert (NULL == peer); |
231 | builder->pitr = NULL; | 231 | builder->pitr = NULL; |
232 | GNUNET_free_non_null (builder->data); | 232 | GNUNET_free (builder->data); |
233 | GNUNET_free (builder); | 233 | GNUNET_free (builder); |
234 | builder = NULL; | 234 | builder = NULL; |
235 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 235 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -534,7 +534,7 @@ process_notify (void *cls, | |||
534 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); | 534 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); |
535 | builder->pitr = NULL; | 535 | builder->pitr = NULL; |
536 | } | 536 | } |
537 | GNUNET_free_non_null (builder->data); | 537 | GNUNET_free (builder->data); |
538 | builder->size = 0; | 538 | builder->size = 0; |
539 | builder->data = NULL; | 539 | builder->data = NULL; |
540 | } | 540 | } |
@@ -886,7 +886,7 @@ GNUNET_HOSTLIST_server_stop () | |||
886 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); | 886 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); |
887 | builder->pitr = NULL; | 887 | builder->pitr = NULL; |
888 | } | 888 | } |
889 | GNUNET_free_non_null (builder->data); | 889 | GNUNET_free (builder->data); |
890 | GNUNET_free (builder); | 890 | GNUNET_free (builder); |
891 | builder = NULL; | 891 | builder = NULL; |
892 | } | 892 | } |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index d10924eac..063db2f99 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c | |||
@@ -136,8 +136,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
136 | 136 | ||
137 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 137 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
138 | p->cfg = GNUNET_CONFIGURATION_create (); | 138 | p->cfg = GNUNET_CONFIGURATION_create (); |
139 | p->arm_proc = GNUNET_OS_start_process (GNUNET_YES, | 139 | p->arm_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
140 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 140 | | GNUNET_OS_USE_PIPE_CONTROL, |
141 | NULL, | 141 | NULL, |
142 | NULL, | 142 | NULL, |
143 | NULL, | 143 | NULL, |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index a45721521..a0656f770 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -390,7 +390,7 @@ handle_ad_arrive (void *cls, | |||
390 | expected_uri, | 390 | expected_uri, |
391 | current_adv_uri); | 391 | current_adv_uri); |
392 | GNUNET_free (expected_uri); | 392 | GNUNET_free (expected_uri); |
393 | GNUNET_free_non_null (hostname); | 393 | GNUNET_free (hostname); |
394 | } | 394 | } |
395 | 395 | ||
396 | 396 | ||
@@ -412,7 +412,8 @@ setup_learn_peer (struct PeerContext *p, | |||
412 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 412 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
413 | p->cfg = GNUNET_CONFIGURATION_create (); | 413 | p->cfg = GNUNET_CONFIGURATION_create (); |
414 | p->arm_proc = | 414 | p->arm_proc = |
415 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 415 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
416 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
416 | NULL, NULL, NULL, | 417 | NULL, NULL, NULL, |
417 | binary, | 418 | binary, |
418 | "gnunet-service-arm", | 419 | "gnunet-service-arm", |
@@ -459,8 +460,8 @@ setup_adv_peer (struct PeerContext *p, | |||
459 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 460 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
460 | p->cfg = GNUNET_CONFIGURATION_create (); | 461 | p->cfg = GNUNET_CONFIGURATION_create (); |
461 | p->arm_proc = | 462 | p->arm_proc = |
462 | GNUNET_OS_start_process (GNUNET_YES, | 463 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
463 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 464 | | GNUNET_OS_USE_PIPE_CONTROL, |
464 | NULL, NULL, NULL, | 465 | NULL, NULL, NULL, |
465 | binary, | 466 | binary, |
466 | "gnunet-service-arm", | 467 | "gnunet-service-arm", |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 657b85fd8..321f96f3d 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -105,8 +105,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
105 | 105 | ||
106 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 106 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
107 | p->cfg = GNUNET_CONFIGURATION_create (); | 107 | p->cfg = GNUNET_CONFIGURATION_create (); |
108 | p->arm_proc = GNUNET_OS_start_process (GNUNET_YES, | 108 | p->arm_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
109 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 109 | | GNUNET_OS_USE_PIPE_CONTROL, |
110 | NULL, | 110 | NULL, |
111 | NULL, | 111 | NULL, |
112 | NULL, | 112 | NULL, |