gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix shutdown, fix size calc


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix shutdown, fix size calculation
Date: Fri, 16 Dec 2016 12:10:30 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new f5db4fd  fix shutdown, fix size calculation
f5db4fd is described below

commit f5db4fd9c3225e242633d6545f7b764767a938c1
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Dec 16 12:10:19 2016 +0100

    fix shutdown, fix size calculation
---
 src/nat/gnunet-nat.c         | 6 +++---
 src/nat/gnunet-service-nat.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c
index ff326fe..07e6514 100644
--- a/src/nat/gnunet-nat.c
+++ b/src/nat/gnunet-nat.c
@@ -401,6 +401,9 @@ run (void *cls,
   if (use_udp)
     proto = IPPROTO_UDP;
 
+  GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
+                                NULL);
+
   if (do_auto)
   {
     ah = GNUNET_NAT_autoconfig_start (c,
@@ -501,9 +504,6 @@ run (void *cls,
                              NULL);
   }
 
-  GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
-                                NULL);
-
   if (NULL != remote_addr)
   {
     int ret;
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 0da8548..4ad6c8d 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -837,7 +837,7 @@ handle_autoconfig_request (void *cls,
                           const struct GNUNET_NAT_AutoconfigRequestMessage 
*message)
 {
   struct ClientHandle *ch = cls;
-  size_t left = ntohs (message->header.size);
+  size_t left = ntohs (message->header.size) - sizeof (*message);
   struct GNUNET_CONFIGURATION_Handle *c;
 
   c = GNUNET_CONFIGURATION_create ();

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]