diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2022-01-06 23:41:30 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2022-01-06 23:41:30 +0100 |
commit | aa8a1d1faeee94b92c3bb9094cbaa1c1e63f1e38 (patch) | |
tree | 88b03df371a67451b859911e7ee3c765e5f5b903 /src/gnunet_chat_handle_intern.c | |
parent | a7308b22bf24131c5a0bf715e4f79e375e4bcfa2 (diff) | |
download | libgnunetchat-aa8a1d1faeee94b92c3bb9094cbaa1c1e63f1e38.tar.gz libgnunetchat-aa8a1d1faeee94b92c3bb9094cbaa1c1e63f1e38.zip |
Updated file uploading to allow setting user pointer before upload
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/gnunet_chat_handle_intern.c')
-rw-r--r-- | src/gnunet_chat_handle_intern.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gnunet_chat_handle_intern.c b/src/gnunet_chat_handle_intern.c index 2200e8e..57f1c5b 100644 --- a/src/gnunet_chat_handle_intern.c +++ b/src/gnunet_chat_handle_intern.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2021 GNUnet e.V. | 3 | Copyright (C) 2021--2022 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -418,7 +418,14 @@ on_handle_message (void *cls, | |||
418 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST | 418 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST |
419 | ); | 419 | ); |
420 | 420 | ||
421 | struct GNUNET_CHAT_File *file = file_create_from_message( | 421 | struct GNUNET_CHAT_File *file = GNUNET_CONTAINER_multihashmap_get( |
422 | context->handle->files, &(msg->body.file.hash) | ||
423 | ); | ||
424 | |||
425 | if (file) | ||
426 | break; | ||
427 | |||
428 | file = file_create_from_message( | ||
422 | context->handle, &(msg->body.file) | 429 | context->handle, &(msg->body.file) |
423 | ); | 430 | ); |
424 | 431 | ||