gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r25534 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r25534 - gnunet/src/mesh
Date: Tue, 18 Dec 2012 20:19:11 +0100

Author: bartpolot
Date: 2012-12-18 20:19:10 +0100 (Tue, 18 Dec 2012)
New Revision: 25534

Modified:
   gnunet/src/mesh/mesh_api.c
Log:
- allow NULL arrays of handlers and stypes

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2012-12-18 19:12:22 UTC (rev 25533)
+++ gnunet/src/mesh/mesh_api.c  2012-12-18 19:19:10 UTC (rev 25534)
@@ -1719,8 +1719,12 @@
   h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
 
   /* count handlers and apps, calculate size */
-  for (h->n_applications = 0; stypes[h->n_applications]; h->n_applications++) ;
-  for (h->n_handlers = 0; handlers[h->n_handlers].type; h->n_handlers++) ;
+  for (h->n_applications = 0;
+       stypes && stypes[h->n_applications];
+       h->n_applications++) ;
+  for (h->n_handlers = 0;
+       handlers && handlers[h->n_handlers].type;
+       h->n_handlers++) ;
   send_connect (h);
   LOG (GNUNET_ERROR_TYPE_DEBUG, "GNUNET_MESH_connect() END\n");
   return h;




reply via email to

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