gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 10/11: Fix open port, copy handlers for use on inc


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 10/11: Fix open port, copy handlers for use on incoming channels
Date: Wed, 08 Feb 2017 19:44:38 +0100

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

bart-polot pushed a commit to branch master
in repository gnunet.

commit ec05b7e9cef7322f3291c96c278056f387ba574b
Author: Bart Polot <address@hidden>
AuthorDate: Wed Feb 8 19:41:41 2017 +0100

    Fix open port, copy handlers for use on incoming channels
---
 src/cadet/cadet_api.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index e20796d17..7b9ac62b3 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -2538,7 +2538,16 @@ GNUNET_CADET_open_porT (struct GNUNET_CADET_Handle *h,
   p->cls = connects_cls;
   p->window_changes = window_changes;
   p->disconnects = disconnects;
-  p->handlers = handlers;
+  if (NULL != handlers)
+  {
+    unsigned int i;
+    for (i=0;NULL != handlers[i].cb; i++) ;
+    p->handlers = GNUNET_new_array (i + 1,
+                                    struct GNUNET_MQ_MessageHandler);
+    GNUNET_memcpy ((struct GNUNET_MQ_MessageHandler *) p->handlers,
+                   handlers,
+                   i * sizeof (struct GNUNET_MQ_MessageHandler));
+  }
 
   GNUNET_assert (GNUNET_OK ==
                 GNUNET_CONTAINER_multihashmap_put (h->ports,

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



reply via email to

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