aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_message_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_send.c')
-rw-r--r--src/messenger/gnunet-service-messenger_message_send.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_send.c b/src/messenger/gnunet-service-messenger_message_send.c
deleted file mode 100644
index 8cc2466d7..000000000
--- a/src/messenger/gnunet-service-messenger_message_send.c
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2020--2021 GNUnet e.V.
4
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
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20/**
21 * @author Tobias Frisch
22 * @file src/messenger/gnunet-service-messenger_message_send.c
23 * @brief GNUnet MESSENGER service
24 */
25
26#include "gnunet-service-messenger_message_send.h"
27
28#include "gnunet-service-messenger_member.h"
29#include "gnunet-service-messenger_member_session.h"
30#include "gnunet-service-messenger_operation.h"
31
32void
33send_message_join (struct GNUNET_MESSENGER_SrvRoom *room,
34 struct GNUNET_MESSENGER_SrvHandle *handle,
35 const struct GNUNET_MESSENGER_Message *message,
36 const struct GNUNET_HashCode *hash)
37{
38 check_room_peer_status(room, NULL);
39}
40
41void
42send_message_peer (struct GNUNET_MESSENGER_SrvRoom *room,
43 struct GNUNET_MESSENGER_SrvHandle *handle,
44 const struct GNUNET_MESSENGER_Message *message,
45 const struct GNUNET_HashCode *hash)
46{
47 if (!room->peer_message)
48 room->peer_message = GNUNET_new(struct GNUNET_HashCode);
49
50 GNUNET_memcpy(room->peer_message, hash, sizeof(struct GNUNET_HashCode));
51}
52
53void
54send_message_id (struct GNUNET_MESSENGER_SrvRoom *room,
55 struct GNUNET_MESSENGER_SrvHandle *handle,
56 const struct GNUNET_MESSENGER_Message *message,
57 const struct GNUNET_HashCode *hash)
58{
59 change_handle_member_id (handle, get_room_key(room), &(message->body.id.id));
60}
61
62void
63send_message_request (struct GNUNET_MESSENGER_SrvRoom *room,
64 struct GNUNET_MESSENGER_SrvHandle *handle,
65 const struct GNUNET_MESSENGER_Message *message,
66 const struct GNUNET_HashCode *hash)
67{
68 struct GNUNET_MESSENGER_OperationStore *operation_store = get_room_operation_store(room);
69
70 use_store_operation(
71 operation_store,
72 &(message->body.request.hash),
73 GNUNET_MESSENGER_OP_REQUEST,
74 GNUNET_MESSENGER_REQUEST_DELAY
75 );
76}