From b63fdaa3905794d49c5267dd41a2a4ce3e9fbbfb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Wed, 8 Sep 2010 11:14:29 +0000 Subject: [PATCH] minor fixes --- src/vpn/gnunet-daemon-vpn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 1ec1df77c..d4922d3c0 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -70,8 +70,8 @@ static void cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx static void helper_read(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx); static void start_helper_and_schedule() { - mycls.helper_in = GNUNET_DISK_pipe(1); - mycls.helper_out = GNUNET_DISK_pipe(1); + mycls.helper_in = GNUNET_DISK_pipe(GNUNET_YES); + mycls.helper_out = GNUNET_DISK_pipe(GNUNET_YES); if (mycls.helper_in == NULL || mycls.helper_out == NULL) return; @@ -174,7 +174,7 @@ static void message_token(void *cls, void *client, const struct GNUNET_MessageHe struct ip_pkt *pkt = (struct ip_pkt*) message; struct ip_udp *udp = (struct ip_udp*) message; if (pkt->ip_hdr.proto == 0x11 && udp->ip_hdr.dadr == 0x020a0a0a && ntohs(udp->udp_hdr.dpt) == 53 ) { - size_t len = sizeof(struct query_packet) + ntohs(udp->udp_hdr.len) - 9; /* 7 = 8 for the udp-header + 1 for the unsigned char data[1]; */ + size_t len = sizeof(struct query_packet) + ntohs(udp->udp_hdr.len) - 9; /* 9 = 8 for the udp-header + 1 for the unsigned char data[1]; */ struct query_packet* query = GNUNET_malloc(len); query->hdr.type = htons(GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS); query->hdr.size = htons(len); -- 2.25.1