diff options
Diffstat (limited to 'src/mesh/mesh_api.c')
-rw-r--r-- | src/mesh/mesh_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 22ef3e19b..d670f4f30 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -404,7 +404,7 @@ create_channel (struct GNUNET_MESH_Handle *h, MESH_ChannelNumber chid) | |||
404 | { | 404 | { |
405 | struct GNUNET_MESH_Channel *ch; | 405 | struct GNUNET_MESH_Channel *ch; |
406 | 406 | ||
407 | ch = GNUNET_malloc (sizeof (struct GNUNET_MESH_Channel)); | 407 | ch = GNUNET_new (struct GNUNET_MESH_Channel); |
408 | GNUNET_CONTAINER_DLL_insert (h->channels_head, h->channels_tail, ch); | 408 | GNUNET_CONTAINER_DLL_insert (h->channels_head, h->channels_tail, ch); |
409 | ch->mesh = h; | 409 | ch->mesh = h; |
410 | if (0 == chid) | 410 | if (0 == chid) |
@@ -1243,7 +1243,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, | |||
1243 | struct GNUNET_MESH_Handle *h; | 1243 | struct GNUNET_MESH_Handle *h; |
1244 | 1244 | ||
1245 | LOG (GNUNET_ERROR_TYPE_DEBUG, "GNUNET_MESH_connect()\n"); | 1245 | LOG (GNUNET_ERROR_TYPE_DEBUG, "GNUNET_MESH_connect()\n"); |
1246 | h = GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle)); | 1246 | h = GNUNET_new (struct GNUNET_MESH_Handle); |
1247 | LOG (GNUNET_ERROR_TYPE_DEBUG, " addr %p\n", h); | 1247 | LOG (GNUNET_ERROR_TYPE_DEBUG, " addr %p\n", h); |
1248 | h->cfg = cfg; | 1248 | h->cfg = cfg; |
1249 | h->new_channel = new_channel; | 1249 | h->new_channel = new_channel; |
@@ -1496,7 +1496,7 @@ GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Channel *channel, int cork | |||
1496 | LOG (GNUNET_ERROR_TYPE_DEBUG, " payload size %u\n", notify_size); | 1496 | LOG (GNUNET_ERROR_TYPE_DEBUG, " payload size %u\n", notify_size); |
1497 | GNUNET_assert (NULL != notify); | 1497 | GNUNET_assert (NULL != notify); |
1498 | GNUNET_assert (0 == channel->packet_size); // Only one data packet allowed | 1498 | GNUNET_assert (0 == channel->packet_size); // Only one data packet allowed |
1499 | th = GNUNET_malloc (sizeof (struct GNUNET_MESH_TransmitHandle)); | 1499 | th = GNUNET_new (struct GNUNET_MESH_TransmitHandle); |
1500 | th->channel = channel; | 1500 | th->channel = channel; |
1501 | th->timeout = GNUNET_TIME_relative_to_absolute (maxdelay); | 1501 | th->timeout = GNUNET_TIME_relative_to_absolute (maxdelay); |
1502 | th->size = notify_size + sizeof (struct GNUNET_MESH_LocalData); | 1502 | th->size = notify_size + sizeof (struct GNUNET_MESH_LocalData); |