diff options
author | t3sserakt <t3ss@posteo.de> | 2021-08-04 15:10:40 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-08-04 15:11:09 +0200 |
commit | 087337ed13af01c2016a6f084024de14d02a5851 (patch) | |
tree | 5d9a82e859715218cceb921b118cae5e5a4f2acf | |
parent | 873381c653bbd96f376f8fa028fc49b5ec4fc721 (diff) | |
parent | 9fecb9ed0ea6ae70d636412dead00e56cb3f474c (diff) | |
download | gnunet-087337ed13af01c2016a6f084024de14d02a5851.tar.gz gnunet-087337ed13af01c2016a6f084024de14d02a5851.zip |
Merge branch 'master' of ssh://gnunet.org/gnunet
-rw-r--r-- | ChangeLog | 84 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | src/dhtu/plugin_dhtu_ip.c | 67 | ||||
-rw-r--r-- | src/include/platform.h | 2 | ||||
-rw-r--r-- | src/pq/pq_connect.c | 4 | ||||
-rw-r--r-- | src/pq/test_pq.c | 14 | ||||
-rw-r--r-- | src/setu/gnunet-service-setu.c | 12 | ||||
-rw-r--r-- | src/util/configuration.c | 13 |
9 files changed, 146 insertions, 53 deletions
@@ -1,3 +1,87 @@ | |||
1 | Fri, 30 Jul 2021 22:20:05 +0200 (dccf60f89) | ||
2 | config: handle syntax error instead of dereferencing NULL pointer - Florian Dold | ||
3 | |||
4 | Fri, 2 Apr 2021 15:46:25 +0200 (ebc70e1bc) | ||
5 | SETU: Implement LSD0003 - Martin Schanzenbach | ||
6 | |||
7 | Thu, 29 Jul 2021 14:26:22 -0400 (72250781a) | ||
8 | use modern spelling for LLONG_{MAX,MIN} - Thien-Thi Nguyen | ||
9 | |||
10 | Thu, 29 Jul 2021 17:15:32 +0200 (6212bce41) | ||
11 | config: restrict directives in files loaded via @inline-secret@ - Florian Dold | ||
12 | |||
13 | Thu, 29 Jul 2021 10:42:18 -0400 (12e29f004) | ||
14 | add dependency lib to a couple targets - Thien-Thi Nguyen | ||
15 | |||
16 | Thu, 29 Jul 2021 16:13:16 +0200 (b69774cba) | ||
17 | do not warn when GNUNET_DISK_file_test can't access file - Florian Dold | ||
18 | |||
19 | Thu, 29 Jul 2021 15:40:36 +0200 (73ae1f379) | ||
20 | config: prettier pretty printing - Florian Dold | ||
21 | |||
22 | Thu, 29 Jul 2021 15:03:19 +0200 (8af5277c8) | ||
23 | debian: bump version - Florian Dold | ||
24 | |||
25 | Thu, 29 Jul 2021 14:59:10 +0200 (b41bca631) | ||
26 | fall back to /etc for default configuration entry point - Florian Dold | ||
27 | |||
28 | Wed, 28 Jul 2021 21:23:44 +0200 (cadca90ca) | ||
29 | debian: bump version - Florian Dold | ||
30 | |||
31 | Wed, 28 Jul 2021 21:00:30 +0200 (3012383a1) | ||
32 | config: report stats for secret sections - Florian Dold | ||
33 | |||
34 | Wed, 28 Jul 2021 20:19:38 +0200 (346706b18) | ||
35 | config: extended diagnostics, import cycle detection, deterministic load order - Florian Dold | ||
36 | |||
37 | Wed, 28 Jul 2021 18:59:07 +0200 (1af9f6c1c) | ||
38 | config: sort globbed files - Florian Dold | ||
39 | |||
40 | Wed, 28 Jul 2021 17:34:44 +0200 (7a0caef7a) | ||
41 | diagnostics mode for gnunet-config - Florian Dold | ||
42 | |||
43 | Wed, 28 Jul 2021 15:47:39 +0200 (2cdd91d55) | ||
44 | fall back to /etc if user config can't be found - Florian Dold | ||
45 | |||
46 | Wed, 28 Jul 2021 15:26:55 +0200 (94ea7a1fa) | ||
47 | implement @inline-secret@ directive - Florian Dold | ||
48 | |||
49 | Wed, 28 Jul 2021 14:31:38 +0200 (7615d46b0) | ||
50 | implement config inline globbing - Florian Dold | ||
51 | |||
52 | Mon, 26 Jul 2021 20:30:28 +0200 (28dfb1220) | ||
53 | config: resolve realpath of parent config file, fix docs - Florian Dold | ||
54 | |||
55 | Mon, 26 Jul 2021 20:03:29 +0200 (51e5fab47) | ||
56 | config: free real basepath - Florian Dold | ||
57 | |||
58 | Mon, 26 Jul 2021 19:59:29 +0200 (cda72d5c4) | ||
59 | config: resolve realpath of base dir, not config - Florian Dold | ||
60 | |||
61 | Mon, 26 Jul 2021 19:35:56 +0200 (473939543) | ||
62 | debian: bump version - Florian Dold | ||
63 | |||
64 | Mon, 26 Jul 2021 19:33:38 +0200 (16fe9a808) | ||
65 | config: resolve symlinks for @INLINE@-ed files - Florian Dold | ||
66 | |||
67 | Mon, 26 Jul 2021 17:49:43 +0200 (302e97b01) | ||
68 | debian: bump version - Florian Dold | ||
69 | |||
70 | Mon, 26 Jul 2021 16:32:34 +0200 (90095d19b) | ||
71 | implement typed JSON packer - Christian Grothoff | ||
72 | |||
73 | Mon, 26 Jul 2021 15:45:39 +0200 (baa855368) | ||
74 | debian: bump version - Florian Dold | ||
75 | |||
76 | Mon, 26 Jul 2021 15:31:14 +0200 (51990dbbf) | ||
77 | JSON: add draft for new GNUNET_JSON_PACK API - Christian Grothoff | ||
78 | |||
79 | Sat, 24 Jul 2021 22:50:22 +0200 (d63771f25) | ||
80 | minimal test for new pq event functionality - Christian Grothoff | ||
81 | |||
82 | Sat, 24 Jul 2021 22:05:46 +0200 (31eae6bbe) | ||
83 | early draft for libgnunetpq event notification support - Christian Grothoff | ||
84 | |||
1 | Fri, 23 Jul 2021 20:10:45 +0200 (be8bca817) | 85 | Fri, 23 Jul 2021 20:10:45 +0200 (be8bca817) |
2 | introduce new TIME helper functions - Christian Grothoff | 86 | introduce new TIME helper functions - Christian Grothoff |
3 | 87 | ||
diff --git a/configure.ac b/configure.ac index 00746a6db..e18a3b502 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -21,7 +21,7 @@ | |||
21 | # | 21 | # |
22 | AC_PREREQ([2.69]) | 22 | AC_PREREQ([2.69]) |
23 | # Checks for programs. | 23 | # Checks for programs. |
24 | AC_INIT([gnunet],[0.14.1],[bug-gnunet@gnu.org]) | 24 | AC_INIT([gnunet],[0.15.0],[bug-gnunet@gnu.org]) |
25 | AC_CONFIG_AUX_DIR([build-aux]) | 25 | AC_CONFIG_AUX_DIR([build-aux]) |
26 | 26 | ||
27 | # check for legacy option that is no longer supported (#5627) and fail hard | 27 | # check for legacy option that is no longer supported (#5627) and fail hard |
diff --git a/po/POTFILES.in b/po/POTFILES.in index b02a3fea4..a274c8e9e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -523,7 +523,6 @@ src/util/common_allocation.c | |||
523 | src/util/common_endian.c | 523 | src/util/common_endian.c |
524 | src/util/common_logging.c | 524 | src/util/common_logging.c |
525 | src/util/configuration.c | 525 | src/util/configuration.c |
526 | src/util/configuration_loader.c | ||
527 | src/util/consttime_memcmp.c | 526 | src/util/consttime_memcmp.c |
528 | src/util/container_bloomfilter.c | 527 | src/util/container_bloomfilter.c |
529 | src/util/container_heap.c | 528 | src/util/container_heap.c |
diff --git a/src/dhtu/plugin_dhtu_ip.c b/src/dhtu/plugin_dhtu_ip.c index f80325cbc..8593a69ef 100644 --- a/src/dhtu/plugin_dhtu_ip.c +++ b/src/dhtu/plugin_dhtu_ip.c | |||
@@ -64,12 +64,12 @@ struct GNUNET_DHTU_Source | |||
64 | * Address in URL form ("ip+udp://$IP:$PORT") | 64 | * Address in URL form ("ip+udp://$IP:$PORT") |
65 | */ | 65 | */ |
66 | char *address; | 66 | char *address; |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Hash of the IP address. | 69 | * Hash of the IP address. |
70 | */ | 70 | */ |
71 | struct GNUNET_DHTU_Hash id; | 71 | struct GNUNET_DHTU_Hash id; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * My actual address. | 74 | * My actual address. |
75 | */ | 75 | */ |
@@ -79,12 +79,12 @@ struct GNUNET_DHTU_Source | |||
79 | * Number of bytes in @a addr. | 79 | * Number of bytes in @a addr. |
80 | */ | 80 | */ |
81 | socklen_t addrlen; | 81 | socklen_t addrlen; |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * Last generation this address was observed. | 84 | * Last generation this address was observed. |
85 | */ | 85 | */ |
86 | unsigned int scan_generation; | 86 | unsigned int scan_generation; |
87 | 87 | ||
88 | }; | 88 | }; |
89 | 89 | ||
90 | 90 | ||
@@ -104,12 +104,12 @@ struct GNUNET_DHTU_Target | |||
104 | * Kept in a DLL. | 104 | * Kept in a DLL. |
105 | */ | 105 | */ |
106 | struct GNUNET_DHTU_Target *prev; | 106 | struct GNUNET_DHTU_Target *prev; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Application context for this target. | 109 | * Application context for this target. |
110 | */ | 110 | */ |
111 | void *app_ctx; | 111 | void *app_ctx; |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Hash of the IP address. | 114 | * Hash of the IP address. |
115 | */ | 115 | */ |
@@ -124,7 +124,7 @@ struct GNUNET_DHTU_Target | |||
124 | * Tail of preferences expressed for this target. | 124 | * Tail of preferences expressed for this target. |
125 | */ | 125 | */ |
126 | struct GNUNET_DHTU_PreferenceHandle *ph_tail; | 126 | struct GNUNET_DHTU_PreferenceHandle *ph_tail; |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * Target IP address. | 129 | * Target IP address. |
130 | */ | 130 | */ |
@@ -134,7 +134,7 @@ struct GNUNET_DHTU_Target | |||
134 | * Number of bytes in @a addr. | 134 | * Number of bytes in @a addr. |
135 | */ | 135 | */ |
136 | socklen_t addrlen; | 136 | socklen_t addrlen; |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * Preference counter, length of the @a ph_head DLL. | 139 | * Preference counter, length of the @a ph_head DLL. |
140 | */ | 140 | */ |
@@ -170,7 +170,7 @@ struct GNUNET_DHTU_PreferenceHandle | |||
170 | */ | 170 | */ |
171 | struct Plugin | 171 | struct Plugin |
172 | { | 172 | { |
173 | /** | 173 | /** |
174 | * Callbacks into the DHT. | 174 | * Callbacks into the DHT. |
175 | */ | 175 | */ |
176 | struct GNUNET_DHTU_PluginEnvironment *env; | 176 | struct GNUNET_DHTU_PluginEnvironment *env; |
@@ -200,7 +200,7 @@ struct Plugin | |||
200 | * Map from hashes of sockaddrs to targets. | 200 | * Map from hashes of sockaddrs to targets. |
201 | */ | 201 | */ |
202 | struct GNUNET_CONTAINER_MultiHashMap *dsts; | 202 | struct GNUNET_CONTAINER_MultiHashMap *dsts; |
203 | 203 | ||
204 | /** | 204 | /** |
205 | * Task that scans for IP address changes. | 205 | * Task that scans for IP address changes. |
206 | */ | 206 | */ |
@@ -212,7 +212,7 @@ struct Plugin | |||
212 | struct GNUNET_SCHEDULER_Task *read_task; | 212 | struct GNUNET_SCHEDULER_Task *read_task; |
213 | 213 | ||
214 | /** | 214 | /** |
215 | * Port we bind to. | 215 | * Port we bind to. |
216 | */ | 216 | */ |
217 | char *port; | 217 | char *port; |
218 | 218 | ||
@@ -290,7 +290,7 @@ create_target (struct Plugin *plugin, | |||
290 | GNUNET_CONTAINER_multihashmap_size (plugin->dsts)) | 290 | GNUNET_CONTAINER_multihashmap_size (plugin->dsts)) |
291 | { | 291 | { |
292 | struct GNUNET_HashCode key; | 292 | struct GNUNET_HashCode key; |
293 | 293 | ||
294 | dst = NULL; | 294 | dst = NULL; |
295 | for (struct GNUNET_DHTU_Target *pos = plugin->dst_head; | 295 | for (struct GNUNET_DHTU_Target *pos = plugin->dst_head; |
296 | NULL != pos; | 296 | NULL != pos; |
@@ -316,7 +316,7 @@ create_target (struct Plugin *plugin, | |||
316 | GNUNET_assert (NULL == dst->ph_head); | 316 | GNUNET_assert (NULL == dst->ph_head); |
317 | GNUNET_free (dst); | 317 | GNUNET_free (dst); |
318 | } | 318 | } |
319 | pk.size = htons (sizeof (pk)); | 319 | pk.size = htons (sizeof (pk)); |
320 | dst = GNUNET_new (struct GNUNET_DHTU_Target); | 320 | dst = GNUNET_new (struct GNUNET_DHTU_Target); |
321 | dst->addrlen = addrlen; | 321 | dst->addrlen = addrlen; |
322 | memcpy (&dst->addr, | 322 | memcpy (&dst->addr, |
@@ -391,10 +391,10 @@ find_target (struct Plugin *plugin, | |||
391 | addrlen); | 391 | addrlen); |
392 | GNUNET_assert (GNUNET_YES == | 392 | GNUNET_assert (GNUNET_YES == |
393 | GNUNET_CONTAINER_multihashmap_put ( | 393 | GNUNET_CONTAINER_multihashmap_put ( |
394 | plugin->dsts, | 394 | plugin->dsts, |
395 | &key, | 395 | &key, |
396 | dst, | 396 | dst, |
397 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 397 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
398 | } | 398 | } |
399 | else | 399 | else |
400 | { | 400 | { |
@@ -429,7 +429,7 @@ ip_try_connect (void *cls, | |||
429 | .ai_flags = AI_NUMERICHOST | AI_NUMERICSERV | 429 | .ai_flags = AI_NUMERICHOST | AI_NUMERICSERV |
430 | }; | 430 | }; |
431 | struct addrinfo *result = NULL; | 431 | struct addrinfo *result = NULL; |
432 | 432 | ||
433 | if (0 != | 433 | if (0 != |
434 | strncmp (address, | 434 | strncmp (address, |
435 | "ip+", | 435 | "ip+", |
@@ -481,7 +481,7 @@ ip_try_connect (void *cls, | |||
481 | * Request underlay to keep the connection to @a target alive if possible. | 481 | * Request underlay to keep the connection to @a target alive if possible. |
482 | * Hold may be called multiple times to express a strong preference to | 482 | * Hold may be called multiple times to express a strong preference to |
483 | * keep a connection, say because a @a target is in multiple tables. | 483 | * keep a connection, say because a @a target is in multiple tables. |
484 | * | 484 | * |
485 | * @param cls closure | 485 | * @param cls closure |
486 | * @param target connection to keep alive | 486 | * @param target connection to keep alive |
487 | */ | 487 | */ |
@@ -503,7 +503,7 @@ ip_hold (void *cls, | |||
503 | 503 | ||
504 | /** | 504 | /** |
505 | * Do no long request underlay to keep the connection alive. | 505 | * Do no long request underlay to keep the connection alive. |
506 | * | 506 | * |
507 | * @param cls closure | 507 | * @param cls closure |
508 | * @param target connection to keep alive | 508 | * @param target connection to keep alive |
509 | */ | 509 | */ |
@@ -511,7 +511,7 @@ static void | |||
511 | ip_drop (struct GNUNET_DHTU_PreferenceHandle *ph) | 511 | ip_drop (struct GNUNET_DHTU_PreferenceHandle *ph) |
512 | { | 512 | { |
513 | struct GNUNET_DHTU_Target *target = ph->target; | 513 | struct GNUNET_DHTU_Target *target = ph->target; |
514 | 514 | ||
515 | GNUNET_CONTAINER_DLL_remove (target->ph_head, | 515 | GNUNET_CONTAINER_DLL_remove (target->ph_head, |
516 | target->ph_tail, | 516 | target->ph_tail, |
517 | ph); | 517 | ph); |
@@ -532,7 +532,7 @@ ip_drop (struct GNUNET_DHTU_PreferenceHandle *ph) | |||
532 | * @param msg_size number of bytes in @a msg | 532 | * @param msg_size number of bytes in @a msg |
533 | * @param finished_cb function called once transmission is done | 533 | * @param finished_cb function called once transmission is done |
534 | * (not called if @a target disconnects, then only the | 534 | * (not called if @a target disconnects, then only the |
535 | * disconnect_cb is called). | 535 | * disconnect_cb is called). |
536 | * @param finished_cb_cls closure for @a finished_cb | 536 | * @param finished_cb_cls closure for @a finished_cb |
537 | */ | 537 | */ |
538 | static void | 538 | static void |
@@ -568,7 +568,7 @@ create_source (struct Plugin *plugin, | |||
568 | socklen_t addrlen) | 568 | socklen_t addrlen) |
569 | { | 569 | { |
570 | struct GNUNET_DHTU_Source *src; | 570 | struct GNUNET_DHTU_Source *src; |
571 | 571 | ||
572 | src = GNUNET_new (struct GNUNET_DHTU_Source); | 572 | src = GNUNET_new (struct GNUNET_DHTU_Source); |
573 | src->addrlen = addrlen; | 573 | src->addrlen = addrlen; |
574 | memcpy (&src->addr, | 574 | memcpy (&src->addr, |
@@ -731,7 +731,7 @@ find_source (struct Plugin *plugin, | |||
731 | (0 == memcmp (addr, | 731 | (0 == memcmp (addr, |
732 | &src->addr, | 732 | &src->addr, |
733 | addrlen)) ) | 733 | addrlen)) ) |
734 | return src; | 734 | return src; |
735 | } | 735 | } |
736 | 736 | ||
737 | return create_source (plugin, | 737 | return create_source (plugin, |
@@ -788,7 +788,7 @@ read_cb (void *cls) | |||
788 | cmsg->cmsg_len) | 788 | cmsg->cmsg_len) |
789 | { | 789 | { |
790 | struct in_pktinfo pi; | 790 | struct in_pktinfo pi; |
791 | 791 | ||
792 | memcpy (&pi, | 792 | memcpy (&pi, |
793 | CMSG_DATA (cmsg), | 793 | CMSG_DATA (cmsg), |
794 | sizeof (pi)); | 794 | sizeof (pi)); |
@@ -797,7 +797,7 @@ read_cb (void *cls) | |||
797 | .sin_family = AF_INET, | 797 | .sin_family = AF_INET, |
798 | .sin_addr = pi.ipi_addr | 798 | .sin_addr = pi.ipi_addr |
799 | }; | 799 | }; |
800 | 800 | ||
801 | src = find_source (plugin, | 801 | src = find_source (plugin, |
802 | &sa, | 802 | &sa, |
803 | sizeof (sa)); | 803 | sizeof (sa)); |
@@ -814,7 +814,7 @@ read_cb (void *cls) | |||
814 | cmsg->cmsg_len) | 814 | cmsg->cmsg_len) |
815 | { | 815 | { |
816 | struct in6_pktinfo pi; | 816 | struct in6_pktinfo pi; |
817 | 817 | ||
818 | memcpy (&pi, | 818 | memcpy (&pi, |
819 | CMSG_DATA (cmsg), | 819 | CMSG_DATA (cmsg), |
820 | sizeof (pi)); | 820 | sizeof (pi)); |
@@ -824,7 +824,7 @@ read_cb (void *cls) | |||
824 | .sin6_addr = pi.ipi6_addr, | 824 | .sin6_addr = pi.ipi6_addr, |
825 | .sin6_scope_id = pi.ipi6_ifindex | 825 | .sin6_scope_id = pi.ipi6_ifindex |
826 | }; | 826 | }; |
827 | 827 | ||
828 | src = find_source (plugin, | 828 | src = find_source (plugin, |
829 | &sa, | 829 | &sa, |
830 | sizeof (sa)); | 830 | sizeof (sa)); |
@@ -833,7 +833,7 @@ read_cb (void *cls) | |||
833 | } | 833 | } |
834 | else | 834 | else |
835 | GNUNET_break (0); | 835 | GNUNET_break (0); |
836 | } | 836 | } |
837 | } | 837 | } |
838 | dst = find_target (plugin, | 838 | dst = find_target (plugin, |
839 | &sa, | 839 | &sa, |
@@ -932,7 +932,8 @@ libgnunet_plugin_dhtu_ip_init (void *cls) | |||
932 | GNUNET_free (plugin); | 932 | GNUNET_free (plugin); |
933 | return NULL; | 933 | return NULL; |
934 | } | 934 | } |
935 | switch (af) { | 935 | switch (af) |
936 | { | ||
936 | case AF_INET: | 937 | case AF_INET: |
937 | { | 938 | { |
938 | int on = 1; | 939 | int on = 1; |
@@ -956,7 +957,7 @@ libgnunet_plugin_dhtu_ip_init (void *cls) | |||
956 | 957 | ||
957 | if (0 != | 958 | if (0 != |
958 | bind (sock, | 959 | bind (sock, |
959 | &sa, | 960 | (const struct sockaddr *) &sa, |
960 | sizeof (sa))) | 961 | sizeof (sa))) |
961 | { | 962 | { |
962 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, | 963 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, |
@@ -989,10 +990,10 @@ libgnunet_plugin_dhtu_ip_init (void *cls) | |||
989 | .sin6_family = AF_INET6, | 990 | .sin6_family = AF_INET6, |
990 | .sin6_port = htons ((uint16_t) nport) | 991 | .sin6_port = htons ((uint16_t) nport) |
991 | }; | 992 | }; |
992 | 993 | ||
993 | if (0 != | 994 | if (0 != |
994 | bind (sock, | 995 | bind (sock, |
995 | &sa, | 996 | (const struct sockaddr *) &sa, |
996 | sizeof (sa))) | 997 | sizeof (sa))) |
997 | { | 998 | { |
998 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, | 999 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/include/platform.h b/src/include/platform.h index e641b38eb..dfa30aeee 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * @author Nils Durner | 22 | * @author Nils Durner |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * | 24 | * |
25 | * @file | 25 | * @file gnunet/src/include/platform.h |
26 | * Platform specific includes and defines. | 26 | * Platform specific includes and defines. |
27 | * | 27 | * |
28 | * This file should never be included by installed | 28 | * This file should never be included by installed |
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index 4e614526b..b06a591cf 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c | |||
@@ -294,7 +294,7 @@ GNUNET_PQ_reconnect_if_down (struct GNUNET_PQ_Context *db) | |||
294 | void | 294 | void |
295 | GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) | 295 | GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) |
296 | { | 296 | { |
297 | if (NULL != db->sc) | 297 | if (NULL != db->sc) |
298 | db->sc (db->sc_cls, | 298 | db->sc (db->sc_cls, |
299 | -1); | 299 | -1); |
300 | if (NULL != db->conn) | 300 | if (NULL != db->conn) |
@@ -468,6 +468,8 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
468 | void | 468 | void |
469 | GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) | 469 | GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) |
470 | { | 470 | { |
471 | if (NULL == db) | ||
472 | return; | ||
471 | GNUNET_assert (0 == | 473 | GNUNET_assert (0 == |
472 | GNUNET_CONTAINER_multishortmap_size (db->channel_map)); | 474 | GNUNET_CONTAINER_multishortmap_size (db->channel_map)); |
473 | GNUNET_CONTAINER_multishortmap_destroy (db->channel_map); | 475 | GNUNET_CONTAINER_multishortmap_destroy (db->channel_map); |
diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c index 1df1cd126..ffbb4d129 100644 --- a/src/pq/test_pq.c +++ b/src/pq/test_pq.c | |||
@@ -38,7 +38,7 @@ static int ret; | |||
38 | /** | 38 | /** |
39 | * An event handler. | 39 | * An event handler. |
40 | */ | 40 | */ |
41 | static struct GNUNET_PQ_EventHandler *eh; | 41 | static struct GNUNET_DB_EventHandler *eh; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * Timeout task. | 44 | * Timeout task. |
@@ -129,7 +129,7 @@ run_queries (struct GNUNET_PQ_Context *db) | |||
129 | uint64_t u64; | 129 | uint64_t u64; |
130 | uint64_t u642; | 130 | uint64_t u642; |
131 | uint64_t uzzz = 42; | 131 | uint64_t uzzz = 42; |
132 | 132 | ||
133 | priv = GNUNET_CRYPTO_rsa_private_key_create (1024); | 133 | priv = GNUNET_CRYPTO_rsa_private_key_create (1024); |
134 | pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv); | 134 | pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv); |
135 | memset (&hmsg, 42, sizeof(hmsg)); | 135 | memset (&hmsg, 42, sizeof(hmsg)); |
@@ -264,16 +264,16 @@ event_cb (void *cls, | |||
264 | static int | 264 | static int |
265 | test_notify (struct GNUNET_PQ_Context *db) | 265 | test_notify (struct GNUNET_PQ_Context *db) |
266 | { | 266 | { |
267 | struct GNUNET_PQ_EventHeaderP e1 = { | 267 | struct GNUNET_DB_EventHeaderP e1 = { |
268 | .size = htons (sizeof (e1)), | 268 | .size = htons (sizeof (e1)), |
269 | .type = htons (1) | 269 | .type = htons (1) |
270 | }; | 270 | }; |
271 | struct GNUNET_PQ_EventHeaderP e2 = { | 271 | struct GNUNET_DB_EventHeaderP e2 = { |
272 | .size = htons (sizeof (e2)), | 272 | .size = htons (sizeof (e2)), |
273 | .type = htons (2) | 273 | .type = htons (2) |
274 | }; | 274 | }; |
275 | unsigned int called = 0; | 275 | unsigned int called = 0; |
276 | struct GNUNET_PQ_EventHandler *eh; | 276 | struct GNUNET_DB_EventHandler *eh; |
277 | 277 | ||
278 | eh = GNUNET_PQ_event_listen (db, | 278 | eh = GNUNET_PQ_event_listen (db, |
279 | &e1, | 279 | &e1, |
@@ -359,7 +359,7 @@ event_sched_cb (void *cls, | |||
359 | static void | 359 | static void |
360 | sched_tests (void *cls) | 360 | sched_tests (void *cls) |
361 | { | 361 | { |
362 | struct GNUNET_PQ_EventHeaderP es = { | 362 | struct GNUNET_DB_EventHeaderP es = { |
363 | .size = htons (sizeof (es)), | 363 | .size = htons (sizeof (es)), |
364 | .type = htons (42) | 364 | .type = htons (42) |
365 | }; | 365 | }; |
@@ -382,7 +382,7 @@ sched_tests (void *cls) | |||
382 | 5); | 382 | 5); |
383 | } | 383 | } |
384 | 384 | ||
385 | 385 | ||
386 | int | 386 | int |
387 | main (int argc, | 387 | main (int argc, |
388 | const char *const argv[]) | 388 | const char *const argv[]) |
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c index 2d258bfc5..b01b897d8 100644 --- a/src/setu/gnunet-service-setu.c +++ b/src/setu/gnunet-service-setu.c | |||
@@ -1746,8 +1746,8 @@ full_sync_plausibility_check (struct Operation *op) | |||
1746 | { | 1746 | { |
1747 | LOG (GNUNET_ERROR_TYPE_ERROR, | 1747 | LOG (GNUNET_ERROR_TYPE_ERROR, |
1748 | "PROTOCOL VIOLATION: Received duplicate element in full receiving " | 1748 | "PROTOCOL VIOLATION: Received duplicate element in full receiving " |
1749 | "mode of operation this is not allowed! Duplicates: %lu\n", | 1749 | "mode of operation this is not allowed! Duplicates: %llu\n", |
1750 | duplicates); | 1750 | (unsigned long long) duplicates); |
1751 | GNUNET_break_op (0); | 1751 | GNUNET_break_op (0); |
1752 | fail_union_operation (op); | 1752 | fail_union_operation (op); |
1753 | return; | 1753 | return; |
@@ -2184,10 +2184,10 @@ send_ibf (struct Operation *op, | |||
2184 | buckets_in_message, &msg[1], msg->ibf_counter_bit_length); | 2184 | buckets_in_message, &msg[1], msg->ibf_counter_bit_length); |
2185 | buckets_sent += buckets_in_message; | 2185 | buckets_sent += buckets_in_message; |
2186 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2186 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2187 | "ibf chunk size %u, %lu/%u sent\n", | 2187 | "ibf chunk size %u, %llu/%u sent\n", |
2188 | buckets_in_message, | 2188 | (unsigned int) buckets_in_message, |
2189 | buckets_sent, | 2189 | (unsigned long long) buckets_sent, |
2190 | ibf_size); | 2190 | (unsigned int) ibf_size); |
2191 | GNUNET_MQ_send (op->mq, ev); | 2191 | GNUNET_MQ_send (op->mq, ev); |
2192 | } | 2192 | } |
2193 | 2193 | ||
diff --git a/src/util/configuration.c b/src/util/configuration.c index 93bc03189..dff3c2e99 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -322,7 +322,9 @@ GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg) | |||
322 | GNUNET_CONTAINER_DLL_remove (cfg->loaded_files_head, | 322 | GNUNET_CONTAINER_DLL_remove (cfg->loaded_files_head, |
323 | cfg->loaded_files_tail, | 323 | cfg->loaded_files_tail, |
324 | cf); | 324 | cf); |
325 | GNUNET_free (cf); | ||
325 | } | 326 | } |
327 | GNUNET_free (cfg->main_filename); | ||
326 | GNUNET_free (cfg); | 328 | GNUNET_free (cfg); |
327 | } | 329 | } |
328 | 330 | ||
@@ -336,7 +338,9 @@ GNUNET_CONFIGURATION_parse_and_run (const char *filename, | |||
336 | enum GNUNET_GenericReturnValue ret; | 338 | enum GNUNET_GenericReturnValue ret; |
337 | 339 | ||
338 | cfg = GNUNET_CONFIGURATION_create (); | 340 | cfg = GNUNET_CONFIGURATION_create (); |
339 | if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, filename)) | 341 | if (GNUNET_OK != |
342 | GNUNET_CONFIGURATION_load (cfg, | ||
343 | filename)) | ||
340 | { | 344 | { |
341 | GNUNET_break (0); | 345 | GNUNET_break (0); |
342 | GNUNET_CONFIGURATION_destroy (cfg); | 346 | GNUNET_CONFIGURATION_destroy (cfg); |
@@ -620,7 +624,7 @@ handle_inline (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
620 | { | 624 | { |
621 | fun_ret = GNUNET_OK; | 625 | fun_ret = GNUNET_OK; |
622 | } | 626 | } |
623 | cleanup: | 627 | cleanup: |
624 | cfg->current_nest_level = old_nest_level; | 628 | cfg->current_nest_level = old_nest_level; |
625 | if (NULL != other_cfg) | 629 | if (NULL != other_cfg) |
626 | GNUNET_CONFIGURATION_destroy (other_cfg); | 630 | GNUNET_CONFIGURATION_destroy (other_cfg); |
@@ -2314,7 +2318,7 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
2314 | if (fun_ret != GNUNET_OK) | 2318 | if (fun_ret != GNUNET_OK) |
2315 | break; | 2319 | break; |
2316 | } | 2320 | } |
2317 | cleanup: | 2321 | cleanup: |
2318 | if (files_context.files_length > 0) | 2322 | if (files_context.files_length > 0) |
2319 | { | 2323 | { |
2320 | for (size_t i = 0; i < files_context.files_length; i++) | 2324 | for (size_t i = 0; i < files_context.files_length; i++) |
@@ -2467,7 +2471,10 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
2467 | } | 2471 | } |
2468 | cfg->load_called = true; | 2472 | cfg->load_called = true; |
2469 | if (NULL != filename) | 2473 | if (NULL != filename) |
2474 | { | ||
2475 | GNUNET_free (cfg->main_filename); | ||
2470 | cfg->main_filename = GNUNET_strdup (filename); | 2476 | cfg->main_filename = GNUNET_strdup (filename); |
2477 | } | ||
2471 | 2478 | ||
2472 | base_config_varname = GNUNET_OS_project_data_get ()->base_config_varname; | 2479 | base_config_varname = GNUNET_OS_project_data_get ()->base_config_varname; |
2473 | 2480 | ||