diff options
author | Gabor X Toth <*@tg-x.net> | 2014-01-06 00:09:37 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2014-01-06 00:09:37 +0000 |
commit | c04d45b9738e1764d2e2c21efdbeb129f298d5d1 (patch) | |
tree | 9eec32efdd3fe3f9f459630af16058cc47436bce /src/multicast | |
parent | 83a0e31631dbc199c37c42f11004e1be544f04a8 (diff) | |
download | gnunet-c04d45b9738e1764d2e2c21efdbeb129f298d5d1.tar.gz gnunet-c04d45b9738e1764d2e2c21efdbeb129f298d5d1.zip |
psyc: ipc messages
Diffstat (limited to 'src/multicast')
-rw-r--r-- | src/multicast/multicast_api.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c index 40fb6cc33..6b784c2f0 100644 --- a/src/multicast/multicast_api.c +++ b/src/multicast/multicast_api.c | |||
@@ -361,14 +361,13 @@ schedule_origin_to_all (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc | |||
361 | struct GNUNET_MULTICAST_Origin *orig = cls; | 361 | struct GNUNET_MULTICAST_Origin *orig = cls; |
362 | struct GNUNET_MULTICAST_OriginMessageHandle *mh = &orig->msg_handle; | 362 | struct GNUNET_MULTICAST_OriginMessageHandle *mh = &orig->msg_handle; |
363 | 363 | ||
364 | size_t buf_size = GNUNET_MULTICAST_FRAGMENT_MAX_SIZE; | 364 | size_t buf_size = GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD; |
365 | struct GNUNET_MULTICAST_MessageHeader *msg | 365 | struct GNUNET_MULTICAST_MessageHeader *msg |
366 | = GNUNET_malloc (buf_size); | 366 | = GNUNET_malloc (buf_size); |
367 | buf_size -= sizeof (*msg); | ||
368 | int ret = mh->notify (mh->notify_cls, &buf_size, &msg[1]); | 367 | int ret = mh->notify (mh->notify_cls, &buf_size, &msg[1]); |
369 | 368 | ||
370 | if (! (GNUNET_YES == ret || GNUNET_NO == ret) | 369 | if (! (GNUNET_YES == ret || GNUNET_NO == ret) |
371 | || sizeof (*msg) + buf_size > GNUNET_MULTICAST_FRAGMENT_MAX_SIZE) | 370 | || GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < buf_size) |
372 | { | 371 | { |
373 | LOG (GNUNET_ERROR_TYPE_ERROR, | 372 | LOG (GNUNET_ERROR_TYPE_ERROR, |
374 | "MasterTransmitNotify() returned error or invalid message size.\n"); | 373 | "MasterTransmitNotify() returned error or invalid message size.\n"); |