summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-14 12:06:18 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-14 12:06:18 +0000
commit9df4cb72d3e3b914caa8e1dc451519715a360026 (patch)
treef020046b369296c67e0835cafbb4b3bfe643463c /src
parent3ab14ab0253aeb1e715caad470e8f308c8243cdf (diff)
-make buildbots happier
Diffstat (limited to 'src')
-rw-r--r--src/mysql/Makefile.am5
-rw-r--r--src/postgres/Makefile.am4
-rw-r--r--src/transport/plugin_transport_udp.c4
-rw-r--r--src/transport/plugin_transport_udp.h26
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c13
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
AM_CFLAGS = --coverage
endif
+if HAVE_MYSQL
lib_LTLIBRARIES = libgnunetmysql.la
+endif
libgnunetmysql_la_SOURCES = \
mysql.c
libgnunetmysql_la_LIBADD = $(MYSQL_LDFLAGS) -lmysqlclient \
- $(top_builddir)/src/util/libgnunetutil.la
+ $(top_builddir)/src/util/libgnunetutil.la
libgnunetmysql_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) \
-version-info 0:0:0
-
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
AM_CFLAGS = --coverage
endif
+if HAVE_POSTGRES
lib_LTLIBRARIES = libgnunetpostgres.la
+endif
libgnunetpostgres_la_SOURCES = \
postgres.c
libgnunetpostgres_la_LIBADD = -lpq \
- $(top_builddir)/src/util/libgnunetutil.la
+ $(top_builddir)/src/util/libgnunetutil.la
libgnunetpostgres_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) \
-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)
switch (ntohs (msg->type))
{
case GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON:
- udp_broadcast_receive (plugin, &buf, size, addr, fromlen);
+ udp_broadcast_receive (plugin, buf, size, addr, fromlen);
return;
case GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE:
@@ -2905,7 +2905,7 @@ setup_sockets (struct Plugin *plugin,
sockets_created++;
}
else
- {
+ {
LOG (GNUNET_ERROR_TYPE_ERROR,
"Failed to bind UDP socket to %s: %s\n",
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
*/
struct IPv4UdpAddress
{
- /**
- * Optional options and flags for this address
- */
- uint32_t options GNUNET_PACKED;
+ /**
+ * Optional options and flags for this address
+ */
+ uint32_t options GNUNET_PACKED;
/**
* IPv4 address, in network byte order.
@@ -79,10 +79,10 @@ struct IPv4UdpAddress
*/
struct IPv6UdpAddress
{
- /**
- * Optional options and flags for this address
- */
- uint32_t options GNUNET_PACKED;
+ /**
+ * Optional options and flags for this address
+ */
+ uint32_t options GNUNET_PACKED;
/**
* IPv6 address.
@@ -296,10 +296,16 @@ const char *
udp_address_to_string (void *cls, const void *addr, size_t addrlen);
void
-udp_broadcast_receive ();
+udp_broadcast_receive (struct Plugin *plugin,
+ const char * buf,
+ ssize_t size,
+ const struct sockaddr *addr,
+ size_t addrlen);
void
-setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, struct sockaddr_in *server_addrv4);
+setup_broadcast (struct Plugin *plugin,
+ struct sockaddr_in6 *server_addrv6,
+ struct sockaddr_in *server_addrv4);
void
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,
return GNUNET_OK;
}
+
void
-udp_broadcast_receive (struct Plugin *plugin, const char * buf, ssize_t size, struct sockaddr *addr, size_t addrlen)
+udp_broadcast_receive (struct Plugin *plugin,
+ const char * buf,
+ ssize_t size,
+ const struct sockaddr *addr,
+ size_t addrlen)
{
struct GNUNET_ATS_Information ats;
@@ -235,6 +240,7 @@ udp_broadcast_receive (struct Plugin *plugin, const char * buf, ssize_t size, st
}
}
+
static unsigned int
prepare_beacon (struct Plugin *plugin, struct UDP_Beacon_Message *msg)
{
@@ -259,6 +265,7 @@ prepare_beacon (struct Plugin *plugin, struct UDP_Beacon_Message *msg)
return msg_size;
}
+
static void
udp_ipv4_broadcast_send (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -312,6 +319,7 @@ udp_ipv4_broadcast_send (void *cls,
&udp_ipv4_broadcast_send, plugin);
}
+
static void
udp_ipv6_broadcast_send (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -421,7 +429,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, stru
}
else
{
- GNUNET_OS_network_interfaces_list (iface_proc, plugin);
+ GNUNET_OS_network_interfaces_list (&iface_proc, plugin);
plugin->send_ipv4_broadcast_task =
GNUNET_SCHEDULER_add_now (&udp_ipv4_broadcast_send, plugin);
@@ -484,6 +492,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, stru
}
}
+
void
stop_broadcast (struct Plugin *plugin)
{