diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-08-26 20:09:54 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-08-26 20:09:54 +0000 |
commit | a9fccfb90479597e554f05ed71bf7bdcc7837ca5 (patch) | |
tree | 32086fd8b789b7b1817863eef5a6970d2eab6997 | |
parent | 4b9204162686a1d08324e62f3639d76ef2ca3fa3 (diff) | |
download | gnunet-a9fccfb90479597e554f05ed71bf7bdcc7837ca5.tar.gz gnunet-a9fccfb90479597e554f05ed71bf7bdcc7837ca5.zip |
Fixed API test case
-rw-r--r-- | src/mesh/mesh_api_new.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index e2455fac5..0540c765b 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c | |||
@@ -450,10 +450,9 @@ send_connect_packet (void *cls, size_t size, void *buf) | |||
450 | htons (sizeof (struct GNUNET_MESH_ClientConnect) + | 450 | htons (sizeof (struct GNUNET_MESH_ClientConnect) + |
451 | sizeof (uint16_t) * ntypes + | 451 | sizeof (uint16_t) * ntypes + |
452 | sizeof (GNUNET_MESH_ApplicationType) * napps); | 452 | sizeof (GNUNET_MESH_ApplicationType) * napps); |
453 | |||
454 | memcpy (&msg[1], types, sizeof (uint16_t) * ntypes); | 453 | memcpy (&msg[1], types, sizeof (uint16_t) * ntypes); |
455 | memcpy (&msg[1] + sizeof (uint16_t) * ntypes, apps, | 454 | types = (uint16_t *) &msg[1]; |
456 | sizeof (GNUNET_MESH_ApplicationType) * napps); | 455 | memcpy (&types[ntypes], apps, sizeof (GNUNET_MESH_ApplicationType) * napps); |
457 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 456 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
458 | "mesh: Sent %lu bytes long message %d types and %d apps\n", | 457 | "mesh: Sent %lu bytes long message %d types and %d apps\n", |
459 | ntohs (msg->header.size), ntypes, napps); | 458 | ntohs (msg->header.size), ntypes, napps); |