gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r15396 - gnunet/src/mesh
Date: Wed, 1 Jun 2011 20:55:25 +0200

Author: bartpolot
Date: 2011-06-01 20:55:25 +0200 (Wed, 01 Jun 2011)
New Revision: 15396

Modified:
   gnunet/src/mesh/mesh_api_new.c
Log:
Use better condition


Modified: gnunet/src/mesh/mesh_api_new.c
===================================================================
--- gnunet/src/mesh/mesh_api_new.c      2011-06-01 18:41:28 UTC (rev 15395)
+++ gnunet/src/mesh/mesh_api_new.c      2011-06-01 18:55:25 UTC (rev 15396)
@@ -225,12 +225,12 @@
     msg = (struct GNUNET_MESH_ClientConnect *) buf;
     msg->header.type = htons(GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT);
 
-    for (ntypes = 0, types = NULL; h->message_handlers[ntypes].type; ntypes++) 
{
+    for (ntypes = 0, types = NULL; ntypes < h->n_handlers; ntypes++) {
         types = GNUNET_realloc(types, sizeof(uint16_t) * (ntypes + 1));
         types[ntypes] = h->message_handlers[ntypes].type;
     }
 
-    for(napps = 0, apps = NULL; h->applications[napps]; napps++) {
+    for(napps = 0, apps = NULL; napps < h->n_applications; napps++) {
         apps = GNUNET_realloc(apps,
                               sizeof(GNUNET_MESH_ApplicationType) *
                                 (napps + 1));




reply via email to

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