summaryrefslogtreecommitdiffstats
path: root/src/babel.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-03-19 03:44:27 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-03-19 03:44:27 +0100
commit5d068fa244f65c7df2cd6a8e5c6e04dc7e2c9f15 (patch)
treef909de7ea843bbc2eedd600bf1169e18c8b65b34 /src/babel.c
parent415606c73661aa9788a6a16dfc8a75b305246992 (diff)
downloadbabel-5d068fa244f65c7df2cd6a8e5c6e04dc7e2c9f15.tar
babel-5d068fa244f65c7df2cd6a8e5c6e04dc7e2c9f15.zip
Add gp_babel_packet_size() function
Diffstat (limited to 'src/babel.c')
-rw-r--r--src/babel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/babel.c b/src/babel.c
index 4002df2..9242d30 100644
--- a/src/babel.c
+++ b/src/babel.c
@@ -32,8 +32,6 @@
#include <stdlib.h>
-#include <arpa/inet.h>
-
const char *gmrf_protocol_name = "babel";
const char *gmrf_protocol_version = "experimental";
@@ -82,7 +80,7 @@ static void send_hellos(gmrf_t *gmrf, gmrf_context_t *ctx, void *arg) {
add_ihus(gmrf, packet, GP_BABEL_PACKET_MAX, iface);
- gmrf_iface_send_bc(gmrf, iface->gmrf_iface, packet, sizeof(gp_babel_packet_t)+ntohs(packet->len));
+ gmrf_iface_send_bc(gmrf, iface->gmrf_iface, packet, gp_babel_packet_size(packet));
}
}