From c04d45b9738e1764d2e2c21efdbeb129f298d5d1 Mon Sep 17 00:00:00 2001 From: Gabor X Toth <*@tg-x.net> Date: Mon, 6 Jan 2014 00:09:37 +0000 Subject: psyc: ipc messages --- src/multicast/multicast_api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/multicast') 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 struct GNUNET_MULTICAST_Origin *orig = cls; struct GNUNET_MULTICAST_OriginMessageHandle *mh = &orig->msg_handle; - size_t buf_size = GNUNET_MULTICAST_FRAGMENT_MAX_SIZE; + size_t buf_size = GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD; struct GNUNET_MULTICAST_MessageHeader *msg = GNUNET_malloc (buf_size); - buf_size -= sizeof (*msg); int ret = mh->notify (mh->notify_cls, &buf_size, &msg[1]); if (! (GNUNET_YES == ret || GNUNET_NO == ret) - || sizeof (*msg) + buf_size > GNUNET_MULTICAST_FRAGMENT_MAX_SIZE) + || GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < buf_size) { LOG (GNUNET_ERROR_TYPE_ERROR, "MasterTransmitNotify() returned error or invalid message size.\n"); -- cgit v1.2.3