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.c68
1 files changed, 0 insertions, 68 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 a59a178cc..000000000
--- a/src/messenger/gnunet-service-messenger_message_send.c
+++ /dev/null
@@ -1,68 +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, struct GNUNET_MESSENGER_SrvHandle *handle,
34 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
35{
36 check_room_peer_status(room, NULL);
37}
38
39void
40send_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle,
41 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
42{
43 if (!room->peer_message)
44 room->peer_message = GNUNET_new(struct GNUNET_HashCode);
45
46 GNUNET_memcpy(room->peer_message, hash, sizeof(struct GNUNET_HashCode));
47}
48
49void
50send_message_id (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle,
51 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
52{
53 change_handle_member_id (handle, get_room_key(room), &(message->body.id.id));
54}
55
56void
57send_message_request (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle,
58 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
59{
60 struct GNUNET_MESSENGER_OperationStore *operation_store = get_room_operation_store(room);
61
62 use_store_operation(
63 operation_store,
64 &(message->body.request.hash),
65 GNUNET_MESSENGER_OP_REQUEST,
66 GNUNET_MESSENGER_REQUEST_DELAY
67 );
68}