aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_service.c')
-rw-r--r--src/messenger/gnunet-service-messenger_service.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/messenger/gnunet-service-messenger_service.c b/src/messenger/gnunet-service-messenger_service.c
index 83d7632d8..3d5801b09 100644
--- a/src/messenger/gnunet-service-messenger_service.c
+++ b/src/messenger/gnunet-service-messenger_service.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2020--2021 GNUnet e.V. 3 Copyright (C) 2020--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
@@ -94,7 +94,7 @@ iterate_destroy_rooms (void *cls,
94 void *value) 94 void *value)
95{ 95{
96 struct GNUNET_MESSENGER_SrvRoom *room = value; 96 struct GNUNET_MESSENGER_SrvRoom *room = value;
97 destroy_room (room, GNUNET_NO); 97 destroy_srv_room (room, GNUNET_NO);
98 return GNUNET_YES; 98 return GNUNET_YES;
99} 99}
100 100
@@ -159,7 +159,7 @@ add_service_handle (struct GNUNET_MESSENGER_Service *service,
159{ 159{
160 GNUNET_assert((service) && (mq)); 160 GNUNET_assert((service) && (mq));
161 161
162 struct GNUNET_MESSENGER_SrvHandle *handle = create_handle (service, mq); 162 struct GNUNET_MESSENGER_SrvHandle *handle = create_srv_handle (service, mq);
163 163
164 if (handle) 164 if (handle)
165 { 165 {
@@ -179,7 +179,7 @@ remove_service_handle (struct GNUNET_MESSENGER_Service *service,
179 return; 179 return;
180 180
181 if (GNUNET_YES == remove_list_handle (&(service->handles), handle)) 181 if (GNUNET_YES == remove_list_handle (&(service->handles), handle))
182 destroy_handle (handle); 182 destroy_srv_handle (handle);
183} 183}
184 184
185int 185int
@@ -210,17 +210,17 @@ open_service_room (struct GNUNET_MESSENGER_Service *service,
210 struct GNUNET_MESSENGER_SrvRoom *room = get_service_room (service, key); 210 struct GNUNET_MESSENGER_SrvRoom *room = get_service_room (service, key);
211 211
212 if (room) 212 if (room)
213 return open_room (room, handle); 213 return open_srv_room (room, handle);
214 214
215 room = create_room (handle, key); 215 room = create_srv_room (handle, key);
216 216
217 if ((GNUNET_YES == open_room (room, handle)) && 217 if ((GNUNET_YES == open_srv_room (room, handle)) &&
218 (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (service->rooms, 218 (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (service->rooms,
219 key, room, 219 key, room,
220 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST))) 220 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)))
221 return GNUNET_YES; 221 return GNUNET_YES;
222 222
223 destroy_room (room, GNUNET_YES); 223 destroy_srv_room (room, GNUNET_YES);
224 return GNUNET_NO; 224 return GNUNET_NO;
225} 225}
226 226
@@ -236,15 +236,15 @@ entry_service_room (struct GNUNET_MESSENGER_Service *service,
236 236
237 if (room) 237 if (room)
238 { 238 {
239 if (GNUNET_YES == enter_room_at (room, handle, door)) 239 if (GNUNET_YES == enter_srv_room_at (room, handle, door))
240 return GNUNET_YES; 240 return GNUNET_YES;
241 else 241 else
242 return GNUNET_NO; 242 return GNUNET_NO;
243 } 243 }
244 244
245 room = create_room (handle, key); 245 room = create_srv_room (handle, key);
246 246
247 if ((GNUNET_YES == enter_room_at (room, handle, door)) && 247 if ((GNUNET_YES == enter_srv_room_at (room, handle, door)) &&
248 (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (service->rooms, 248 (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (service->rooms,
249 key, room, 249 key, room,
250 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST))) 250 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)))
@@ -253,7 +253,7 @@ entry_service_room (struct GNUNET_MESSENGER_Service *service,
253 } 253 }
254 else 254 else
255 { 255 {
256 destroy_room (room, GNUNET_YES); 256 destroy_srv_room (room, GNUNET_YES);
257 return GNUNET_NO; 257 return GNUNET_NO;
258 } 258 }
259 259
@@ -271,9 +271,9 @@ close_service_room (struct GNUNET_MESSENGER_Service *service,
271 if (!room) 271 if (!room)
272 return GNUNET_NO; 272 return GNUNET_NO;
273 273
274 send_room_message (room, handle, create_message_leave ()); 274 send_srv_room_message (room, handle, create_message_leave ());
275 275
276 const struct GNUNET_ShortHashCode *id = get_handle_member_id (handle, key); 276 const struct GNUNET_ShortHashCode *id = get_srv_handle_member_id (handle, key);
277 277
278 GNUNET_assert(id); 278 GNUNET_assert(id);
279 279
@@ -287,7 +287,7 @@ close_service_room (struct GNUNET_MESSENGER_Service *service,
287 { 287 {
288 if (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove (service->rooms, key, room)) 288 if (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove (service->rooms, key, room))
289 { 289 {
290 destroy_room (room, GNUNET_YES); 290 destroy_srv_room (room, GNUNET_YES);
291 return GNUNET_YES; 291 return GNUNET_YES;
292 } 292 }
293 else 293 else
@@ -313,7 +313,7 @@ handle_service_message (struct GNUNET_MESSENGER_Service *service,
313 313
314 while (element) 314 while (element)
315 { 315 {
316 notify_handle_message (element->handle, room, session, message, hash); 316 notify_srv_handle_message (element->handle, room, session, message, hash);
317 element = element->next; 317 element = element->next;
318 } 318 }
319} 319}