diff options
-rw-r--r-- | src/mysql/Makefile.am | 5 | ||||
-rw-r--r-- | src/postgres/Makefile.am | 4 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 4 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.h | 26 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp_broadcasting.c | 13 |
5 files changed, 35 insertions, 17 deletions
diff --git a/src/mysql/Makefile.am b/src/mysql/Makefile.am index c91dd80ca..d3c9ee31a 100644 --- a/src/mysql/Makefile.am +++ b/src/mysql/Makefile.am | |||
@@ -8,13 +8,14 @@ if USE_COVERAGE | |||
8 | AM_CFLAGS = --coverage | 8 | AM_CFLAGS = --coverage |
9 | endif | 9 | endif |
10 | 10 | ||
11 | if HAVE_MYSQL | ||
11 | lib_LTLIBRARIES = libgnunetmysql.la | 12 | lib_LTLIBRARIES = libgnunetmysql.la |
13 | endif | ||
12 | 14 | ||
13 | libgnunetmysql_la_SOURCES = \ | 15 | libgnunetmysql_la_SOURCES = \ |
14 | mysql.c | 16 | mysql.c |
15 | libgnunetmysql_la_LIBADD = $(MYSQL_LDFLAGS) -lmysqlclient \ | 17 | libgnunetmysql_la_LIBADD = $(MYSQL_LDFLAGS) -lmysqlclient \ |
16 | $(top_builddir)/src/util/libgnunetutil.la | 18 | $(top_builddir)/src/util/libgnunetutil.la |
17 | libgnunetmysql_la_LDFLAGS = \ | 19 | libgnunetmysql_la_LDFLAGS = \ |
18 | $(GN_LIB_LDFLAGS) \ | 20 | $(GN_LIB_LDFLAGS) \ |
19 | -version-info 0:0:0 | 21 | -version-info 0:0:0 |
20 | |||
diff --git a/src/postgres/Makefile.am b/src/postgres/Makefile.am index 85fac752f..a9a7cdfae 100644 --- a/src/postgres/Makefile.am +++ b/src/postgres/Makefile.am | |||
@@ -8,12 +8,14 @@ if USE_COVERAGE | |||
8 | AM_CFLAGS = --coverage | 8 | AM_CFLAGS = --coverage |
9 | endif | 9 | endif |
10 | 10 | ||
11 | if HAVE_POSTGRES | ||
11 | lib_LTLIBRARIES = libgnunetpostgres.la | 12 | lib_LTLIBRARIES = libgnunetpostgres.la |
13 | endif | ||
12 | 14 | ||
13 | libgnunetpostgres_la_SOURCES = \ | 15 | libgnunetpostgres_la_SOURCES = \ |
14 | postgres.c | 16 | postgres.c |
15 | libgnunetpostgres_la_LIBADD = -lpq \ | 17 | libgnunetpostgres_la_LIBADD = -lpq \ |
16 | $(top_builddir)/src/util/libgnunetutil.la | 18 | $(top_builddir)/src/util/libgnunetutil.la |
17 | libgnunetpostgres_la_LDFLAGS = \ | 19 | libgnunetpostgres_la_LDFLAGS = \ |
18 | $(GN_LIB_LDFLAGS) \ | 20 | $(GN_LIB_LDFLAGS) \ |
19 | -version-info 0:0:0 | 21 | -version-info 0:0:0 |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index f5086b070..d69390055 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -2438,7 +2438,7 @@ udp_select_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock) | |||
2438 | switch (ntohs (msg->type)) | 2438 | switch (ntohs (msg->type)) |
2439 | { | 2439 | { |
2440 | case GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON: | 2440 | case GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON: |
2441 | udp_broadcast_receive (plugin, &buf, size, addr, fromlen); | 2441 | udp_broadcast_receive (plugin, buf, size, addr, fromlen); |
2442 | return; | 2442 | return; |
2443 | 2443 | ||
2444 | case GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE: | 2444 | case GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE: |
@@ -2905,7 +2905,7 @@ setup_sockets (struct Plugin *plugin, | |||
2905 | sockets_created++; | 2905 | sockets_created++; |
2906 | } | 2906 | } |
2907 | else | 2907 | else |
2908 | { | 2908 | { |
2909 | LOG (GNUNET_ERROR_TYPE_ERROR, | 2909 | LOG (GNUNET_ERROR_TYPE_ERROR, |
2910 | "Failed to bind UDP socket to %s: %s\n", | 2910 | "Failed to bind UDP socket to %s: %s\n", |
2911 | GNUNET_a2s (server_addr, addrlen), STRERROR (eno)); | 2911 | GNUNET_a2s (server_addr, addrlen), STRERROR (eno)); |
diff --git a/src/transport/plugin_transport_udp.h b/src/transport/plugin_transport_udp.h index 46cea2d5b..fe5a47285 100644 --- a/src/transport/plugin_transport_udp.h +++ b/src/transport/plugin_transport_udp.h | |||
@@ -57,10 +57,10 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
57 | */ | 57 | */ |
58 | struct IPv4UdpAddress | 58 | struct IPv4UdpAddress |
59 | { | 59 | { |
60 | /** | 60 | /** |
61 | * Optional options and flags for this address | 61 | * Optional options and flags for this address |
62 | */ | 62 | */ |
63 | uint32_t options GNUNET_PACKED; | 63 | uint32_t options GNUNET_PACKED; |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * IPv4 address, in network byte order. | 66 | * IPv4 address, in network byte order. |
@@ -79,10 +79,10 @@ struct IPv4UdpAddress | |||
79 | */ | 79 | */ |
80 | struct IPv6UdpAddress | 80 | struct IPv6UdpAddress |
81 | { | 81 | { |
82 | /** | 82 | /** |
83 | * Optional options and flags for this address | 83 | * Optional options and flags for this address |
84 | */ | 84 | */ |
85 | uint32_t options GNUNET_PACKED; | 85 | uint32_t options GNUNET_PACKED; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * IPv6 address. | 88 | * IPv6 address. |
@@ -296,10 +296,16 @@ const char * | |||
296 | udp_address_to_string (void *cls, const void *addr, size_t addrlen); | 296 | udp_address_to_string (void *cls, const void *addr, size_t addrlen); |
297 | 297 | ||
298 | void | 298 | void |
299 | udp_broadcast_receive (); | 299 | udp_broadcast_receive (struct Plugin *plugin, |
300 | const char * buf, | ||
301 | ssize_t size, | ||
302 | const struct sockaddr *addr, | ||
303 | size_t addrlen); | ||
300 | 304 | ||
301 | void | 305 | void |
302 | setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, struct sockaddr_in *server_addrv4); | 306 | setup_broadcast (struct Plugin *plugin, |
307 | struct sockaddr_in6 *server_addrv6, | ||
308 | struct sockaddr_in *server_addrv4); | ||
303 | 309 | ||
304 | void | 310 | void |
305 | stop_broadcast (struct Plugin *plugin); | 311 | stop_broadcast (struct Plugin *plugin); |
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index 25c942de2..8c42e374f 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c | |||
@@ -187,8 +187,13 @@ broadcast_ipv4_mst_cb (void *cls, void *client, | |||
187 | return GNUNET_OK; | 187 | return GNUNET_OK; |
188 | } | 188 | } |
189 | 189 | ||
190 | |||
190 | void | 191 | void |
191 | udp_broadcast_receive (struct Plugin *plugin, const char * buf, ssize_t size, struct sockaddr *addr, size_t addrlen) | 192 | udp_broadcast_receive (struct Plugin *plugin, |
193 | const char * buf, | ||
194 | ssize_t size, | ||
195 | const struct sockaddr *addr, | ||
196 | size_t addrlen) | ||
192 | { | 197 | { |
193 | struct GNUNET_ATS_Information ats; | 198 | struct GNUNET_ATS_Information ats; |
194 | 199 | ||
@@ -235,6 +240,7 @@ udp_broadcast_receive (struct Plugin *plugin, const char * buf, ssize_t size, st | |||
235 | } | 240 | } |
236 | } | 241 | } |
237 | 242 | ||
243 | |||
238 | static unsigned int | 244 | static unsigned int |
239 | prepare_beacon (struct Plugin *plugin, struct UDP_Beacon_Message *msg) | 245 | prepare_beacon (struct Plugin *plugin, struct UDP_Beacon_Message *msg) |
240 | { | 246 | { |
@@ -259,6 +265,7 @@ prepare_beacon (struct Plugin *plugin, struct UDP_Beacon_Message *msg) | |||
259 | return msg_size; | 265 | return msg_size; |
260 | } | 266 | } |
261 | 267 | ||
268 | |||
262 | static void | 269 | static void |
263 | udp_ipv4_broadcast_send (void *cls, | 270 | udp_ipv4_broadcast_send (void *cls, |
264 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 271 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -312,6 +319,7 @@ udp_ipv4_broadcast_send (void *cls, | |||
312 | &udp_ipv4_broadcast_send, plugin); | 319 | &udp_ipv4_broadcast_send, plugin); |
313 | } | 320 | } |
314 | 321 | ||
322 | |||
315 | static void | 323 | static void |
316 | udp_ipv6_broadcast_send (void *cls, | 324 | udp_ipv6_broadcast_send (void *cls, |
317 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 325 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -421,7 +429,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, stru | |||
421 | } | 429 | } |
422 | else | 430 | else |
423 | { | 431 | { |
424 | GNUNET_OS_network_interfaces_list (iface_proc, plugin); | 432 | GNUNET_OS_network_interfaces_list (&iface_proc, plugin); |
425 | plugin->send_ipv4_broadcast_task = | 433 | plugin->send_ipv4_broadcast_task = |
426 | GNUNET_SCHEDULER_add_now (&udp_ipv4_broadcast_send, plugin); | 434 | GNUNET_SCHEDULER_add_now (&udp_ipv4_broadcast_send, plugin); |
427 | 435 | ||
@@ -484,6 +492,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, stru | |||
484 | } | 492 | } |
485 | } | 493 | } |
486 | 494 | ||
495 | |||
487 | void | 496 | void |
488 | stop_broadcast (struct Plugin *plugin) | 497 | stop_broadcast (struct Plugin *plugin) |
489 | { | 498 | { |