From b0a0cc3b954911a42ffd376b9d84d9536fc82a5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Wed, 4 May 2011 07:30:05 +0000 Subject: [PATCH] fix compile-errors --- src/vpn/gnunet-daemon-exit.c | 2 -- src/vpn/gnunet-daemon-vpn.c | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index 3e49a3290..5a9be9335 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c @@ -814,7 +814,6 @@ receive_tcp_service (void *cls, const struct GNUNET_TRANSPORT_ATS_Information *atsi) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); - GNUNET_HashCode hash; GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1); unsigned int pkt_len = ntohs (message->size) - sizeof (struct @@ -917,7 +916,6 @@ receive_udp_service (void *cls, const struct GNUNET_MessageHeader *message, const struct GNUNET_TRANSPORT_ATS_Information *atsi) { - GNUNET_HashCode hash; GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 6829b3cd9..72f52eccc 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -236,6 +236,12 @@ new_ip6addr(unsigned char* buf, const GNUNET_HashCode *peer, const GNUNET_HashCo } /*}}}*/ +char +max (char a, char b) +{ + return a > b ? a : b; +} + /** * Create a new Address from an answer-packet */ @@ -396,7 +402,7 @@ process_answer(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { memset(&key, 0, sizeof(GNUNET_HashCode)); unsigned char* c = ((unsigned char*)pkt)+ntohs(pkt->addroffset); - new_ip6addr_remote(c, &pkt->addr, pkt->addrsize); + new_ip6addr_remote(c, pkt->addr, pkt->addrsize); unsigned char* k = (unsigned char*)&key; /* * Copy the newly generated ip-address to the key backwards (as only the first part is used in the hash-table) -- 2.25.1