diff options
Diffstat (limited to 'src/messenger/messenger_api.c')
-rw-r--r-- | src/messenger/messenger_api.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/messenger/messenger_api.c b/src/messenger/messenger_api.c index ef6244e19..81a02e858 100644 --- a/src/messenger/messenger_api.c +++ b/src/messenger/messenger_api.c | |||
@@ -214,6 +214,7 @@ check_recv_message (void *cls, | |||
214 | if (GNUNET_YES != decode_message (&message, length, buffer, GNUNET_YES, NULL)) | 214 | if (GNUNET_YES != decode_message (&message, length, buffer, GNUNET_YES, NULL)) |
215 | return GNUNET_NO; | 215 | return GNUNET_NO; |
216 | 216 | ||
217 | cleanup_message(&message); | ||
217 | return GNUNET_OK; | 218 | return GNUNET_OK; |
218 | } | 219 | } |
219 | 220 | ||
@@ -254,11 +255,15 @@ handle_recv_message (void *cls, | |||
254 | 255 | ||
255 | handle_room_message (room, contact, &message, hash); | 256 | handle_room_message (room, contact, &message, hash); |
256 | 257 | ||
258 | const struct GNUNET_MESSENGER_Message *stored_message = get_room_message(room, hash); | ||
259 | |||
257 | if (handle->msg_callback) | 260 | if (handle->msg_callback) |
258 | handle->msg_callback (handle->msg_cls, room, contact, &message, hash, flags); | 261 | handle->msg_callback (handle->msg_cls, room, contact, stored_message, hash, flags); |
259 | } | 262 | } |
260 | else | 263 | else |
261 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Room not found\n"); | 264 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Room not found\n"); |
265 | |||
266 | cleanup_message(&message); | ||
262 | } | 267 | } |
263 | 268 | ||
264 | static void | 269 | static void |