aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-06-01 18:55:25 +0000
committerBart Polot <bart@net.in.tum.de>2011-06-01 18:55:25 +0000
commit1fea1c90365c01bf0e8d75ba148367ad4125f5d9 (patch)
tree1f35179193ededfd4bea93626ff39091d68110e7 /src/mesh
parent83adfc4bd5b85d0ab8ecbafeaad8324c396dbfac (diff)
downloadgnunet-1fea1c90365c01bf0e8d75ba148367ad4125f5d9.tar.gz
gnunet-1fea1c90365c01bf0e8d75ba148367ad4125f5d9.zip
Use better condition
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh_api_new.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c
index c9c71405c..2faaf9c7b 100644
--- a/src/mesh/mesh_api_new.c
+++ b/src/mesh/mesh_api_new.c
@@ -225,12 +225,12 @@ send_connect_packet (void *cls, size_t size, void *buf)
225 msg = (struct GNUNET_MESH_ClientConnect *) buf; 225 msg = (struct GNUNET_MESH_ClientConnect *) buf;
226 msg->header.type = htons(GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT); 226 msg->header.type = htons(GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT);
227 227
228 for (ntypes = 0, types = NULL; h->message_handlers[ntypes].type; ntypes++) { 228 for (ntypes = 0, types = NULL; ntypes < h->n_handlers; ntypes++) {
229 types = GNUNET_realloc(types, sizeof(uint16_t) * (ntypes + 1)); 229 types = GNUNET_realloc(types, sizeof(uint16_t) * (ntypes + 1));
230 types[ntypes] = h->message_handlers[ntypes].type; 230 types[ntypes] = h->message_handlers[ntypes].type;
231 } 231 }
232 232
233 for(napps = 0, apps = NULL; h->applications[napps]; napps++) { 233 for(napps = 0, apps = NULL; napps < h->n_applications; napps++) {
234 apps = GNUNET_realloc(apps, 234 apps = GNUNET_realloc(apps,
235 sizeof(GNUNET_MESH_ApplicationType) * 235 sizeof(GNUNET_MESH_ApplicationType) *
236 (napps + 1)); 236 (napps + 1));