aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns')
-rw-r--r--src/gns/gns_api.c1
-rw-r--r--src/gns/gns_tld_api.c2
-rw-r--r--src/gns/gnunet-dns2gns.c2
-rw-r--r--src/gns/gnunet-gns-import.c34
-rw-r--r--src/gns/gnunet-gns-proxy.c30
-rw-r--r--src/gns/gnunet-service-gns_resolver.c12
-rw-r--r--src/gns/nss/nss_gns.c2
-rw-r--r--src/gns/nss/nss_gns_query.c2
-rw-r--r--src/gns/plugin_gnsrecord_gns.c6
-rw-r--r--src/gns/plugin_rest_gns.c2
-rw-r--r--src/gns/test_gns_lookup.conf3
-rw-r--r--src/gns/test_gns_proxy.c12
12 files changed, 57 insertions, 51 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index 0d99d822e..bf95bf340 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -427,4 +427,5 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
427 proc_cls); 427 proc_cls);
428} 428}
429 429
430
430/* end of gns_api.c */ 431/* end of gns_api.c */
diff --git a/src/gns/gns_tld_api.c b/src/gns/gns_tld_api.c
index 1db5baacb..3ebf07db6 100644
--- a/src/gns/gns_tld_api.c
+++ b/src/gns/gns_tld_api.c
@@ -340,7 +340,7 @@ GNUNET_GNS_lookup_with_tld_cancel (struct GNUNET_GNS_LookupWithTldRequest *ltr)
340 GNUNET_GNS_lookup_cancel (ltr->lr); 340 GNUNET_GNS_lookup_cancel (ltr->lr);
341 ltr->lr = NULL; 341 ltr->lr = NULL;
342 } 342 }
343 GNUNET_free_non_null (ltr->longest_match); 343 GNUNET_free (ltr->longest_match);
344 GNUNET_free (ltr->name); 344 GNUNET_free (ltr->name);
345 GNUNET_free (ltr); 345 GNUNET_free (ltr);
346 return ret; 346 return ret;
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c
index 74309f554..0a9b7c861 100644
--- a/src/gns/gnunet-dns2gns.c
+++ b/src/gns/gnunet-dns2gns.c
@@ -190,6 +190,7 @@ do_shutdown (void *cls)
190 } 190 }
191} 191}
192 192
193
193/** 194/**
194 * Shuffle answers 195 * Shuffle answers
195 * Fisher-Yates (aka Knuth) Shuffle 196 * Fisher-Yates (aka Knuth) Shuffle
@@ -216,6 +217,7 @@ shuffle_answers (struct Request *request)
216 } 217 }
217} 218}
218 219
220
219/** 221/**
220 * Send the response for the given request and clean up. 222 * Send the response for the given request and clean up.
221 * 223 *
diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c
index 2c7c56411..78db28cab 100644
--- a/src/gns/gnunet-gns-import.c
+++ b/src/gns/gnunet-gns-import.c
@@ -87,8 +87,7 @@ static int ret;
87 87
88 88
89static int 89static int
90run_process_and_wait (int pipe_control, 90run_process_and_wait (enum GNUNET_OS_InheritStdioFlags std_inheritance,
91 enum GNUNET_OS_InheritStdioFlags std_inheritance,
92 struct GNUNET_DISK_PipeHandle *pipe_stdin, 91 struct GNUNET_DISK_PipeHandle *pipe_stdin,
93 struct GNUNET_DISK_PipeHandle *pipe_stdout, 92 struct GNUNET_DISK_PipeHandle *pipe_stdout,
94 enum GNUNET_OS_ProcessStatusType *st, 93 enum GNUNET_OS_ProcessStatusType *st,
@@ -120,7 +119,7 @@ run_process_and_wait (int pipe_control,
120 va_end (apc2); 119 va_end (apc2);
121 if (arglen > 0) 120 if (arglen > 0)
122 argp[-1] = '\0'; 121 argp[-1] = '\0';
123 p = GNUNET_OS_start_process_va (pipe_control, std_inheritance, 122 p = GNUNET_OS_start_process_va (std_inheritance,
124 pipe_stdin, 123 pipe_stdin,
125 pipe_stdout, 124 pipe_stdout,
126 NULL, 125 NULL,
@@ -222,7 +221,7 @@ zone_iteration_error (void *cls)
222 221
223 if (! found_private_rec) 222 if (! found_private_rec)
224 { 223 {
225 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 224 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
226 NULL, NULL, &st, &code, 225 NULL, NULL, &st, &code,
227 "gnunet-namestore", 226 "gnunet-namestore",
228 "gnunet-namestore", "-z", "master-zone", 227 "gnunet-namestore", "-z", "master-zone",
@@ -236,7 +235,7 @@ zone_iteration_error (void *cls)
236 } 235 }
237 if (! found_pin_rec) 236 if (! found_pin_rec)
238 { 237 {
239 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 238 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
240 NULL, NULL, &st, &code, 239 NULL, NULL, &st, &code,
241 "gnunet-namestore", 240 "gnunet-namestore",
242 "gnunet-namestore", "-z", "master-zone", 241 "gnunet-namestore", "-z", "master-zone",
@@ -346,9 +345,9 @@ get_ego (void *cls,
346static void 345static void
347shutdown_task (void *cls) 346shutdown_task (void *cls)
348{ 347{
349 GNUNET_free_non_null (master_zone_pkey); 348 GNUNET_free (master_zone_pkey);
350 master_zone_pkey = NULL; 349 master_zone_pkey = NULL;
351 GNUNET_free_non_null (private_zone_pkey); 350 GNUNET_free (private_zone_pkey);
352 private_zone_pkey = NULL; 351 private_zone_pkey = NULL;
353 if (NULL != list_it) 352 if (NULL != list_it)
354 { 353 {
@@ -385,7 +384,8 @@ run (void *cls, char *const *args, const char *cfgfile,
385 384
386 cfg = c; 385 cfg = c;
387 386
388 if (0 != run_process_and_wait (GNUNET_NO, 0, NULL, NULL, &st, &code, 387 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_NONE,
388 NULL, NULL, &st, &code,
389 "gnunet-arm", 389 "gnunet-arm",
390 "gnunet-arm", "-I", NULL)) 390 "gnunet-arm", "-I", NULL))
391 { 391 {
@@ -395,60 +395,60 @@ run (void *cls, char *const *args, const char *cfgfile,
395 return; 395 return;
396 } 396 }
397 397
398 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 398 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
399 NULL, NULL, &st, &code, 399 NULL, NULL, &st, &code,
400 "gnunet-identity", 400 "gnunet-identity",
401 "gnunet-identity", "-C", "master-zone", NULL)) 401 "gnunet-identity", "-C", "master-zone", NULL))
402 return; 402 return;
403 403
404 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 404 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
405 NULL, NULL, &st, &code, 405 NULL, NULL, &st, &code,
406 "gnunet-identity", 406 "gnunet-identity",
407 "gnunet-identity", "-C", "private-zone", NULL)) 407 "gnunet-identity", "-C", "private-zone", NULL))
408 return; 408 return;
409 409
410 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 410 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
411 NULL, NULL, &st, &code, 411 NULL, NULL, &st, &code,
412 "gnunet-identity", 412 "gnunet-identity",
413 "gnunet-identity", "-C", "sks-zone", NULL)) 413 "gnunet-identity", "-C", "sks-zone", NULL))
414 return; 414 return;
415 415
416 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 416 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
417 NULL, NULL, &st, &code, 417 NULL, NULL, &st, &code,
418 "gnunet-identity", 418 "gnunet-identity",
419 "gnunet-identity", "-e", "master-zone", "-s", 419 "gnunet-identity", "-e", "master-zone", "-s",
420 "gns-master", NULL)) 420 "gns-master", NULL))
421 return; 421 return;
422 422
423 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 423 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
424 NULL, NULL, &st, &code, 424 NULL, NULL, &st, &code,
425 "gnunet-identity", 425 "gnunet-identity",
426 "gnunet-identity", "-e", "master-zone", "-s", 426 "gnunet-identity", "-e", "master-zone", "-s",
427 "namestore", NULL)) 427 "namestore", NULL))
428 return; 428 return;
429 429
430 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 430 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
431 NULL, NULL, &st, &code, 431 NULL, NULL, &st, &code,
432 "gnunet-identity", 432 "gnunet-identity",
433 "gnunet-identity", "-e", "master-zone", "-s", 433 "gnunet-identity", "-e", "master-zone", "-s",
434 "gns-proxy", NULL)) 434 "gns-proxy", NULL))
435 return; 435 return;
436 436
437 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 437 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
438 NULL, NULL, &st, &code, 438 NULL, NULL, &st, &code,
439 "gnunet-identity", 439 "gnunet-identity",
440 "gnunet-identity", "-e", "master-zone", "-s", 440 "gnunet-identity", "-e", "master-zone", "-s",
441 "gns-intercept", NULL)) 441 "gns-intercept", NULL))
442 return; 442 return;
443 443
444 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 444 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
445 NULL, NULL, &st, &code, 445 NULL, NULL, &st, &code,
446 "gnunet-identity", 446 "gnunet-identity",
447 "gnunet-identity", "-e", "private-zone", "-s", 447 "gnunet-identity", "-e", "private-zone", "-s",
448 "gns-private", NULL)) 448 "gns-private", NULL))
449 return; 449 return;
450 450
451 if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 451 if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
452 NULL, NULL, &st, &code, 452 NULL, NULL, &st, &code,
453 "gnunet-identity", 453 "gnunet-identity",
454 "gnunet-identity", "-e", "sks-zone", "-s", 454 "gnunet-identity", "-e", "sks-zone", "-s",
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index eb6c6852e..d38204ef1 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -831,9 +831,9 @@ cleanup_s5r (struct Socks5Request *s5r)
831 GNUNET_CONTAINER_DLL_remove (s5r_head, 831 GNUNET_CONTAINER_DLL_remove (s5r_head,
832 s5r_tail, 832 s5r_tail,
833 s5r); 833 s5r);
834 GNUNET_free_non_null (s5r->domain); 834 GNUNET_free (s5r->domain);
835 GNUNET_free_non_null (s5r->leho); 835 GNUNET_free (s5r->leho);
836 GNUNET_free_non_null (s5r->url); 836 GNUNET_free (s5r->url);
837 for (unsigned int i = 0; i < s5r->num_danes; i++) 837 for (unsigned int i = 0; i < s5r->num_danes; i++)
838 GNUNET_free (s5r->dane_data[i]); 838 GNUNET_free (s5r->dane_data[i]);
839 GNUNET_free (s5r); 839 GNUNET_free (s5r);
@@ -1311,8 +1311,8 @@ curl_check_hdr (void *buffer,
1311 } 1311 }
1312cleanup: 1312cleanup:
1313 GNUNET_free (ndup); 1313 GNUNET_free (ndup);
1314 GNUNET_free_non_null (new_cookie_hdr); 1314 GNUNET_free (new_cookie_hdr);
1315 GNUNET_free_non_null (new_location); 1315 GNUNET_free (new_location);
1316 return bytes; 1316 return bytes;
1317} 1317}
1318 1318
@@ -2446,14 +2446,14 @@ kill_httpd (struct MhdHttpList *hd)
2446 GNUNET_CONTAINER_DLL_remove (mhd_httpd_head, 2446 GNUNET_CONTAINER_DLL_remove (mhd_httpd_head,
2447 mhd_httpd_tail, 2447 mhd_httpd_tail,
2448 hd); 2448 hd);
2449 GNUNET_free_non_null (hd->domain); 2449 GNUNET_free (hd->domain);
2450 MHD_stop_daemon (hd->daemon); 2450 MHD_stop_daemon (hd->daemon);
2451 if (NULL != hd->httpd_task) 2451 if (NULL != hd->httpd_task)
2452 { 2452 {
2453 GNUNET_SCHEDULER_cancel (hd->httpd_task); 2453 GNUNET_SCHEDULER_cancel (hd->httpd_task);
2454 hd->httpd_task = NULL; 2454 hd->httpd_task = NULL;
2455 } 2455 }
2456 GNUNET_free_non_null (hd->proxy_cert); 2456 GNUNET_free (hd->proxy_cert);
2457 if (hd == httpd) 2457 if (hd == httpd)
2458 httpd = NULL; 2458 httpd = NULL;
2459 GNUNET_free (hd); 2459 GNUNET_free (hd);
@@ -2657,7 +2657,7 @@ load_key_from_file (gnutls_x509_privkey_t key,
2657 _ ("Unable to import private key from file `%s'\n"), 2657 _ ("Unable to import private key from file `%s'\n"),
2658 keyfile); 2658 keyfile);
2659 } 2659 }
2660 GNUNET_free_non_null (key_data.data); 2660 GNUNET_free (key_data.data);
2661 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 2661 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
2662} 2662}
2663 2663
@@ -2689,7 +2689,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
2689 _ ("Unable to import certificate from `%s'\n"), 2689 _ ("Unable to import certificate from `%s'\n"),
2690 certfile); 2690 certfile);
2691 } 2691 }
2692 GNUNET_free_non_null (cert_data.data); 2692 GNUNET_free (cert_data.data);
2693 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 2693 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
2694} 2694}
2695 2695
@@ -2921,7 +2921,7 @@ setup_data_transfer (struct Socks5Request *s5r)
2921 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2921 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
2922 _ ("Failed to pass client to MHD\n")); 2922 _ ("Failed to pass client to MHD\n"));
2923 cleanup_s5r (s5r); 2923 cleanup_s5r (s5r);
2924 GNUNET_free_non_null (domain); 2924 GNUNET_free (domain);
2925 return; 2925 return;
2926 } 2926 }
2927 s5r->hd = hd; 2927 s5r->hd = hd;
@@ -2929,7 +2929,7 @@ setup_data_transfer (struct Socks5Request *s5r)
2929 s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT, 2929 s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT,
2930 &timeout_s5r_handshake, 2930 &timeout_s5r_handshake,
2931 s5r); 2931 s5r);
2932 GNUNET_free_non_null (domain); 2932 GNUNET_free (domain);
2933} 2933}
2934 2934
2935 2935
@@ -3145,7 +3145,7 @@ handle_gns_result (void *cls,
3145 break; 3145 break;
3146 3146
3147 case GNUNET_GNSRECORD_TYPE_LEHO: 3147 case GNUNET_GNSRECORD_TYPE_LEHO:
3148 GNUNET_free_non_null (s5r->leho); 3148 GNUNET_free (s5r->leho);
3149 s5r->leho = GNUNET_strndup (r->data, 3149 s5r->leho = GNUNET_strndup (r->data,
3150 r->data_size); 3150 r->data_size);
3151 break; 3151 break;
@@ -3732,10 +3732,10 @@ run (void *cls,
3732 gnutls_x509_crt_deinit (proxy_ca.cert); 3732 gnutls_x509_crt_deinit (proxy_ca.cert);
3733 gnutls_x509_privkey_deinit (proxy_ca.key); 3733 gnutls_x509_privkey_deinit (proxy_ca.key);
3734 gnutls_global_deinit (); 3734 gnutls_global_deinit ();
3735 GNUNET_free_non_null (cafile_cfg); 3735 GNUNET_free (cafile_cfg);
3736 return; 3736 return;
3737 } 3737 }
3738 GNUNET_free_non_null (cafile_cfg); 3738 GNUNET_free (cafile_cfg);
3739 if (NULL == (gns_handle = GNUNET_GNS_connect (cfg))) 3739 if (NULL == (gns_handle = GNUNET_GNS_connect (cfg)))
3740 { 3740 {
3741 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 3741 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -3900,7 +3900,7 @@ main (int argc,
3900 options, 3900 options,
3901 &run, NULL)) ? 0 : 1; 3901 &run, NULL)) ? 0 : 1;
3902 MHD_destroy_response (curl_failure_response); 3902 MHD_destroy_response (curl_failure_response);
3903 GNUNET_free_non_null ((char *) argv); 3903 GNUNET_free_nz ((char *) argv);
3904 return ret; 3904 return ret;
3905} 3905}
3906 3906
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 7d398c168..cb75b23c7 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1675,7 +1675,7 @@ recursive_cname_resolution (struct GNS_ResolverHandle *rh,
1675 (off != rd->data_size)) 1675 (off != rd->data_size))
1676 { 1676 {
1677 GNUNET_break_op (0); /* record not well-formed */ 1677 GNUNET_break_op (0); /* record not well-formed */
1678 GNUNET_free_non_null (cname); 1678 GNUNET_free (cname);
1679 fail_resolution (rh); 1679 fail_resolution (rh);
1680 return; 1680 return;
1681 } 1681 }
@@ -1777,8 +1777,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
1777 (off != rd[i].data_size)) 1777 (off != rd[i].data_size))
1778 { 1778 {
1779 GNUNET_break_op (0); 1779 GNUNET_break_op (0);
1780 GNUNET_free_non_null (n); 1780 GNUNET_free (n);
1781 GNUNET_free_non_null (ip); 1781 GNUNET_free (ip);
1782 continue; 1782 continue;
1783 } 1783 }
1784 /* resolve 'ip' to determine the IP(s) of the DNS 1784 /* resolve 'ip' to determine the IP(s) of the DNS
@@ -1983,7 +1983,7 @@ handle_gns_resolution_result (void *cls,
1983 (off != rd[0].data_size)) 1983 (off != rd[0].data_size))
1984 { 1984 {
1985 GNUNET_break_op (0); 1985 GNUNET_break_op (0);
1986 GNUNET_free_non_null (cname); 1986 GNUNET_free (cname);
1987 fail_resolution (rh); 1987 fail_resolution (rh);
1988 return; 1988 return;
1989 } 1989 }
@@ -2137,7 +2137,7 @@ handle_gns_resolution_result (void *cls,
2137 rd_off++; 2137 rd_off++;
2138 } 2138 }
2139 } 2139 }
2140 GNUNET_free_non_null (cname); 2140 GNUNET_free (cname);
2141 } 2141 }
2142 break; 2142 break;
2143 2143
@@ -2993,7 +2993,7 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh)
2993 dr); 2993 dr);
2994 GNUNET_free (dr); 2994 GNUNET_free (dr);
2995 } 2995 }
2996 GNUNET_free_non_null (rh->leho); 2996 GNUNET_free (rh->leho);
2997 GNUNET_free (rh->name); 2997 GNUNET_free (rh->name);
2998 GNUNET_free (rh); 2998 GNUNET_free (rh);
2999} 2999}
diff --git a/src/gns/nss/nss_gns.c b/src/gns/nss/nss_gns.c
index 36799ba3a..77b4340ee 100644
--- a/src/gns/nss/nss_gns.c
+++ b/src/gns/nss/nss_gns.c
@@ -38,7 +38,7 @@
38/** macro to align idx to 32bit boundary */ 38/** macro to align idx to 32bit boundary */
39#define ALIGN(idx) do { \ 39#define ALIGN(idx) do { \
40 if (idx % sizeof(void*)) \ 40 if (idx % sizeof(void*)) \
41 idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on 32 bit boundary */ \ 41 idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on 32 bit boundary */ \
42} while (0) 42} while (0)
43 43
44 44
diff --git a/src/gns/nss/nss_gns_query.c b/src/gns/nss/nss_gns_query.c
index 11e46ad7f..96e8e10da 100644
--- a/src/gns/nss/nss_gns_query.c
+++ b/src/gns/nss/nss_gns_query.c
@@ -150,7 +150,7 @@ query_gns:
150 if (1 == retry) 150 if (1 == retry)
151 return -2; /* no go -> service unavailable */ 151 return -2; /* no go -> service unavailable */
152 retry = 1; 152 retry = 1;
153 system("gnunet-arm -s"); 153 system ("gnunet-arm -s");
154 goto query_gns; /* Try again */ 154 goto query_gns; /* Try again */
155 } 155 }
156 if (3 == WEXITSTATUS (ret)) 156 if (3 == WEXITSTATUS (ret))
diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c
index 370bf1da4..81f2b9eff 100644
--- a/src/gns/plugin_gnsrecord_gns.c
+++ b/src/gns/plugin_gnsrecord_gns.c
@@ -75,14 +75,14 @@ gns_value_to_string (void *cls,
75 if (NULL == ns) 75 if (NULL == ns)
76 { 76 {
77 GNUNET_break_op (0); 77 GNUNET_break_op (0);
78 GNUNET_free_non_null (ns); 78 GNUNET_free (ns);
79 return NULL; 79 return NULL;
80 } 80 }
81 /* DNS server IP/name must be UTF-8 */ 81 /* DNS server IP/name must be UTF-8 */
82 ip = GNUNET_strdup (&((const char*) data)[off]); 82 ip = GNUNET_strdup (&((const char*) data)[off]);
83 GNUNET_asprintf (&nstr, "%s@%s", ns, ip); 83 GNUNET_asprintf (&nstr, "%s@%s", ns, ip);
84 GNUNET_free_non_null (ns); 84 GNUNET_free (ns);
85 GNUNET_free_non_null (ip); 85 GNUNET_free (ip);
86 return nstr; 86 return nstr;
87 } 87 }
88 88
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c
index feb333350..37313c529 100644
--- a/src/gns/plugin_rest_gns.c
+++ b/src/gns/plugin_rest_gns.c
@@ -461,7 +461,7 @@ libgnunet_plugin_rest_gns_done (void *cls)
461 461
462 plugin->cfg = NULL; 462 plugin->cfg = NULL;
463 463
464 GNUNET_free_non_null (allow_methods); 464 GNUNET_free (allow_methods);
465 GNUNET_free (api); 465 GNUNET_free (api);
466 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n"); 466 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n");
467 return NULL; 467 return NULL;
diff --git a/src/gns/test_gns_lookup.conf b/src/gns/test_gns_lookup.conf
index 130d190e7..db0b4bfbe 100644
--- a/src/gns/test_gns_lookup.conf
+++ b/src/gns/test_gns_lookup.conf
@@ -23,7 +23,8 @@ DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0
23#PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/ns_log 23#PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/ns_log
24 24
25[revocation] 25[revocation]
26WORKBITS = 1 26WORKBITS = 2
27EPOCH_DURATION = 365 d
27 28
28[dhtcache] 29[dhtcache]
29QUOTA = 1 MB 30QUOTA = 1 MB
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index 12f3f8625..13764d520 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -139,7 +139,7 @@ load_key_from_file (gnutls_x509_privkey_t key,
139 _ ("Unable to import private key from file `%s'\n"), 139 _ ("Unable to import private key from file `%s'\n"),
140 keyfile); 140 keyfile);
141 } 141 }
142 GNUNET_free_non_null (key_data.data); 142 GNUNET_free (key_data.data);
143 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 143 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
144} 144}
145 145
@@ -171,7 +171,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
171 _ ("Unable to import certificate from `%s'\n"), 171 _ ("Unable to import certificate from `%s'\n"),
172 certfile); 172 certfile);
173 } 173 }
174 GNUNET_free_non_null (cert_data.data); 174 GNUNET_free (cert_data.data);
175 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 175 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
176} 176}
177 177
@@ -245,7 +245,7 @@ do_shutdown ()
245 MHD_stop_daemon (mhd); 245 MHD_stop_daemon (mhd);
246 mhd = NULL; 246 mhd = NULL;
247 } 247 }
248 GNUNET_free_non_null (url); 248 GNUNET_free (url);
249 249
250 if (NULL != proxy_proc) 250 if (NULL != proxy_proc)
251 { 251 {
@@ -528,6 +528,8 @@ run (void *cls,
528int 528int
529main (int argc, char *const *argv) 529main (int argc, char *const *argv)
530{ 530{
531 char *tmp_argv;
532
531 struct GNUNET_GETOPT_CommandLineOption options[] = { 533 struct GNUNET_GETOPT_CommandLineOption options[] = {
532 GNUNET_GETOPT_option_uint16 ('p', 534 GNUNET_GETOPT_option_uint16 ('p',
533 "port", 535 "port",
@@ -557,7 +559,7 @@ main (int argc, char *const *argv)
557 } 559 }
558 if (GNUNET_OK != 560 if (GNUNET_OK !=
559 GNUNET_STRINGS_get_utf8_args (argc, argv, 561 GNUNET_STRINGS_get_utf8_args (argc, argv,
560 &argc, &argv)) 562 &argc, &tmp_argv))
561 return 2; 563 return 2;
562 GNUNET_log_setup ("gnunet-gns-proxy-test", 564 GNUNET_log_setup ("gnunet-gns-proxy-test",
563 "WARNING", 565 "WARNING",
@@ -568,7 +570,7 @@ main (int argc, char *const *argv)
568 options, 570 options,
569 &run, NULL)) 571 &run, NULL))
570 return 1; 572 return 1;
571 GNUNET_free_non_null ((char *) argv); 573 GNUNET_free (tmp_argv);
572 return global_ret; 574 return global_ret;
573} 575}
574 576