[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix duplicate naming of functions in me
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix duplicate naming of functions in messenger |
Date: |
Tue, 07 Jun 2022 22:09:51 +0200 |
This is an automated email from the git hooks/post-receive script.
thejackimonster pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 79eff4349 -fix duplicate naming of functions in messenger
79eff4349 is described below
commit 79eff4349f89d13a8cc707550f6bb7d5fe8c99c3
Author: TheJackiMonster <thejackimonster@gmail.com>
AuthorDate: Tue Jun 7 22:09:43 2022 +0200
-fix duplicate naming of functions in messenger
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
---
src/messenger/gnunet-service-messenger.c | 32 +--
src/messenger/gnunet-service-messenger_ego_store.c | 2 +-
src/messenger/gnunet-service-messenger_handle.c | 114 +++++------
src/messenger/gnunet-service-messenger_handle.h | 70 +++----
.../gnunet-service-messenger_list_handles.c | 6 +-
.../gnunet-service-messenger_member_session.c | 4 +-
.../gnunet-service-messenger_member_store.c | 4 +-
.../gnunet-service-messenger_message_handle.c | 16 +-
.../gnunet-service-messenger_message_recv.c | 16 +-
.../gnunet-service-messenger_message_send.c | 8 +-
src/messenger/gnunet-service-messenger_room.c | 228 ++++++++++-----------
src/messenger/gnunet-service-messenger_room.h | 96 ++++-----
src/messenger/gnunet-service-messenger_service.c | 32 +--
src/messenger/gnunet-service-messenger_tunnel.c | 14 +-
14 files changed, 321 insertions(+), 321 deletions(-)
diff --git a/src/messenger/gnunet-service-messenger.c
b/src/messenger/gnunet-service-messenger.c
index 31bffec18..506ab7443 100644
--- a/src/messenger/gnunet-service-messenger.c
+++ b/src/messenger/gnunet-service-messenger.c
@@ -56,7 +56,7 @@ handle_create (void *cls,
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Handle created with name: %s\n", name);
- setup_handle_name (msg_client->handle, strlen (name) > 0 ? name : NULL);
+ setup_srv_handle_name (msg_client->handle, strlen (name) > 0 ? name : NULL);
GNUNET_SERVICE_client_continue (msg_client->client);
}
@@ -67,7 +67,7 @@ handle_update (void *cls,
{
struct GNUNET_MESSENGER_Client *msg_client = cls;
- update_handle (msg_client->handle);
+ update_srv_handle (msg_client->handle);
GNUNET_SERVICE_client_continue (msg_client->client);
}
@@ -99,7 +99,7 @@ handle_set_name (void *cls,
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Handles name is now: %s\n", name);
- set_handle_name (msg_client->handle, name);
+ set_srv_handle_name (msg_client->handle, name);
GNUNET_SERVICE_client_continue (msg_client->client);
}
@@ -112,9 +112,9 @@ handle_room_open (void *cls,
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Opening room: %s\n", GNUNET_h2s
(&(msg->key)));
- if (GNUNET_YES == open_handle_room (msg_client->handle, &(msg->key)))
+ if (GNUNET_YES == open_srv_handle_room (msg_client->handle, &(msg->key)))
{
- const struct GNUNET_ShortHashCode *member_id = get_handle_member_id
(msg_client->handle, &(msg->key));
+ const struct GNUNET_ShortHashCode *member_id = get_srv_handle_member_id
(msg_client->handle, &(msg->key));
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Opening room with member id: %s\n",
GNUNET_sh2s (member_id));
@@ -139,9 +139,9 @@ handle_room_entry (void *cls,
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Entering room: %s, %s\n", GNUNET_h2s
(&(msg->key)), GNUNET_i2s (&(msg->door)));
- if (GNUNET_YES == entry_handle_room (msg_client->handle, &(msg->door),
&(msg->key)))
+ if (GNUNET_YES == entry_srv_handle_room (msg_client->handle, &(msg->door),
&(msg->key)))
{
- const struct GNUNET_ShortHashCode *member_id = get_handle_member_id
(msg_client->handle, &(msg->key));
+ const struct GNUNET_ShortHashCode *member_id = get_srv_handle_member_id
(msg_client->handle, &(msg->key));
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Entering room with member id: %s\n",
GNUNET_sh2s (member_id));
@@ -168,7 +168,7 @@ handle_room_close (void *cls,
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Closing room: %s\n", GNUNET_h2s
(&(msg->key)));
- if (GNUNET_YES == close_handle_room (msg_client->handle, &(msg->key)))
+ if (GNUNET_YES == close_srv_handle_room (msg_client->handle, &(msg->key)))
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Closing room succeeded: %s\n",
GNUNET_h2s (&(msg->key)));
@@ -271,7 +271,7 @@ handle_send_message (void *cls,
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Sending message: %s to %s\n",
GNUNET_MESSENGER_name_of_kind (message.header.kind), GNUNET_h2s
(key));
- if (GNUNET_YES != send_handle_message (msg_client->handle, key, &message))
+ if (GNUNET_YES != send_srv_handle_message (msg_client->handle, key,
&message))
GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Sending message failed: %s to %s\n",
GNUNET_MESSENGER_name_of_kind (message.header.kind), GNUNET_h2s
(key));
@@ -291,11 +291,11 @@ callback_found_message (void *cls,
if (!message)
{
- send_room_message(room, msg_client->handle, create_message_request(hash));
+ send_srv_room_message(room, msg_client->handle,
create_message_request(hash));
return;
}
- struct GNUNET_MESSENGER_MemberStore *store = get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *store = get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = get_store_member_of(store, message);
@@ -308,7 +308,7 @@ callback_found_message (void *cls,
struct GNUNET_MESSENGER_MemberSession *session =
get_member_session_of(member, message, hash);
if (session)
- notify_handle_message (msg_client->handle, room, session, message, hash);
+ notify_srv_handle_message (msg_client->handle, room, session, message,
hash);
}
static void
@@ -327,9 +327,9 @@ handle_get_message (void *cls,
goto end_handling;
}
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
- struct GNUNET_MESSENGER_Member *member = get_store_member(member_store,
get_handle_member_id(
+ struct GNUNET_MESSENGER_Member *member = get_store_member(member_store,
get_srv_handle_member_id(
msg_client->handle, &(msg->key)
));
@@ -339,7 +339,7 @@ handle_get_message (void *cls,
goto end_handling;
}
- struct GNUNET_MESSENGER_MemberSession *session = get_member_session(member,
&(get_handle_ego(msg_client->handle)->pub));
+ struct GNUNET_MESSENGER_MemberSession *session = get_member_session(member,
&(get_srv_handle_ego(msg_client->handle)->pub));
if (!session)
{
@@ -347,7 +347,7 @@ handle_get_message (void *cls,
goto end_handling;
}
- request_room_message (room, &(msg->hash), session, callback_found_message,
msg_client);
+ request_srv_room_message (room, &(msg->hash), session,
callback_found_message, msg_client);
end_handling:
GNUNET_SERVICE_client_continue (msg_client->client);
diff --git a/src/messenger/gnunet-service-messenger_ego_store.c
b/src/messenger/gnunet-service-messenger_ego_store.c
index 60a4d7bfc..8250d0902 100644
--- a/src/messenger/gnunet-service-messenger_ego_store.c
+++ b/src/messenger/gnunet-service-messenger_ego_store.c
@@ -132,7 +132,7 @@ iterate_create_ego (void *cls,
void *value)
{
struct GNUNET_MESSENGER_SrvHandle *handle = value;
- set_handle_ego (handle, (struct GNUNET_MESSENGER_Ego*) cls);
+ set_srv_handle_ego (handle, (struct GNUNET_MESSENGER_Ego*) cls);
return GNUNET_YES;
}
diff --git a/src/messenger/gnunet-service-messenger_handle.c
b/src/messenger/gnunet-service-messenger_handle.c
index 218482e45..a4fa81623 100644
--- a/src/messenger/gnunet-service-messenger_handle.c
+++ b/src/messenger/gnunet-service-messenger_handle.c
@@ -31,8 +31,8 @@
#include "messenger_api_util.h"
struct GNUNET_MESSENGER_SrvHandle*
-create_handle (struct GNUNET_MESSENGER_Service *service,
- struct GNUNET_MQ_Handle *mq)
+create_srv_handle (struct GNUNET_MESSENGER_Service *service,
+ struct GNUNET_MQ_Handle *mq)
{
GNUNET_assert((service) && (mq));
@@ -60,12 +60,12 @@ iterate_free_member_ids (void *cls,
}
void
-destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle)
+destroy_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert(handle);
if (handle->service->dir)
- save_handle_configuration (handle);
+ save_srv_handle_configuration (handle);
if (handle->name)
{
@@ -83,9 +83,9 @@ destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle)
}
void
-get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
- const char *name,
- char **dir)
+get_srv_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
+ const char *name,
+ char **dir)
{
GNUNET_assert((handle) && (dir));
@@ -124,8 +124,8 @@ create_handle_member_id (const struct
GNUNET_MESSENGER_SrvHandle *handle,
}
const struct GNUNET_ShortHashCode*
-get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key)
+get_srv_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key)
{
GNUNET_assert((handle) && (key));
@@ -133,9 +133,9 @@ get_handle_member_id (const struct
GNUNET_MESSENGER_SrvHandle *handle,
}
int
-change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key,
- const struct GNUNET_ShortHashCode *unique_id)
+change_srv_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key,
+ const struct GNUNET_ShortHashCode *unique_id)
{
GNUNET_assert((handle) && (key) && (unique_id));
@@ -214,7 +214,7 @@ change_handle_ego (struct GNUNET_MESSENGER_SrvHandle
*handle,
handle->ego = ego;
- ego = get_handle_ego (handle);
+ ego = get_srv_handle_ego (handle);
const uint16_t length = GNUNET_IDENTITY_key_get_length(&(ego->pub));
@@ -244,14 +244,14 @@ iterate_send_message (void *cls,
{
struct GNUNET_MESSENGER_MessageHandle *msg_handle = cls;
- send_handle_message (msg_handle->handle, key, msg_handle->message);
+ send_srv_handle_message (msg_handle->handle, key, msg_handle->message);
return GNUNET_YES;
}
void
-set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_MESSENGER_Ego *ego)
+set_srv_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_MESSENGER_Ego *ego)
{
GNUNET_assert((handle) && (ego));
@@ -268,7 +268,7 @@ set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
}
const struct GNUNET_MESSENGER_Ego*
-get_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle)
+get_srv_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert(handle);
@@ -302,12 +302,12 @@ callback_setup_handle_name (void *cls,
change_handle_ego (handle, ego);
if (handle->service->dir)
- load_handle_configuration (handle);
+ load_srv_handle_configuration (handle);
}
void
-setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
- const char *name)
+setup_srv_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const char *name)
{
GNUNET_assert(handle);
@@ -336,7 +336,7 @@ callback_update_handle (void *cls,
}
void
-update_handle (struct GNUNET_MESSENGER_SrvHandle *handle)
+update_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert (handle);
@@ -369,10 +369,10 @@ callback_set_handle_name (void *cls,
struct GNUNET_MESSENGER_EgoStore *store =
get_service_ego_store(handle->service);
char *old_dir;
- get_handle_data_subdir (handle, handle->name, &old_dir);
+ get_srv_handle_data_subdir (handle, handle->name, &old_dir);
char *new_dir;
- get_handle_data_subdir (handle, name, &new_dir);
+ get_srv_handle_data_subdir (handle, name, &new_dir);
if ((GNUNET_YES == GNUNET_DISK_directory_test (new_dir, GNUNET_NO)) &&
(GNUNET_OK != GNUNET_DISK_directory_remove(new_dir)))
@@ -403,8 +403,8 @@ free_dirs:
}
void
-set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
- const char *name)
+set_srv_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const char *name)
{
GNUNET_assert(handle);
@@ -424,50 +424,50 @@ set_handle_name (struct GNUNET_MESSENGER_SrvHandle
*handle,
}
int
-open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key)
+open_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key)
{
GNUNET_assert((handle) && (key));
- if ((!get_handle_member_id (handle, key)) && (GNUNET_YES !=
create_handle_member_id (handle, key)))
+ if ((!get_srv_handle_member_id (handle, key)) && (GNUNET_YES !=
create_handle_member_id (handle, key)))
return GNUNET_NO;
return open_service_room (handle->service, handle, key);
}
int
-entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_PeerIdentity *door,
- const struct GNUNET_HashCode *key)
+entry_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_PeerIdentity *door,
+ const struct GNUNET_HashCode *key)
{
GNUNET_assert((handle) && (door) && (key));
- if ((!get_handle_member_id (handle, key)) && (GNUNET_YES !=
create_handle_member_id (handle, key)))
+ if ((!get_srv_handle_member_id (handle, key)) && (GNUNET_YES !=
create_handle_member_id (handle, key)))
return GNUNET_NO;
return entry_service_room (handle->service, handle, door, key);
}
int
-close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key)
+close_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key)
{
GNUNET_assert((handle) && (key));
- if (!get_handle_member_id (handle, key))
+ if (!get_srv_handle_member_id (handle, key))
return GNUNET_NO;
return close_service_room (handle->service, handle, key);
}
int
-send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key,
- const struct GNUNET_MESSENGER_Message *message)
+send_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key,
+ const struct GNUNET_MESSENGER_Message *message)
{
GNUNET_assert((handle) && (key) && (message));
- const struct GNUNET_ShortHashCode *id = get_handle_member_id (handle, key);
+ const struct GNUNET_ShortHashCode *id = get_srv_handle_member_id (handle,
key);
if (!id)
{
@@ -487,7 +487,7 @@ send_handle_message (struct GNUNET_MESSENGER_SrvHandle
*handle,
GNUNET_memcpy(&(msg->header.sender_id), id, sizeof(*id));
- return send_room_message (room, handle, msg);
+ return send_srv_room_message (room, handle, msg);
}
static const struct GNUNET_HashCode*
@@ -506,15 +506,15 @@ get_handle_member_session (struct
GNUNET_MESSENGER_SrvHandle *handle,
{
GNUNET_assert((handle) && (room) && (key) && (handle->service));
- const struct GNUNET_ShortHashCode *id = get_handle_member_id(handle, key);
+ const struct GNUNET_ShortHashCode *id = get_srv_handle_member_id(handle,
key);
if (!id)
return NULL;
- struct GNUNET_MESSENGER_MemberStore *store = get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *store = get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = get_store_member(store, id);
- const struct GNUNET_MESSENGER_Ego *ego = get_handle_ego(handle);
+ const struct GNUNET_MESSENGER_Ego *ego = get_srv_handle_ego(handle);
if (!ego)
return NULL;
@@ -523,17 +523,17 @@ get_handle_member_session (struct
GNUNET_MESSENGER_SrvHandle *handle,
}
void
-notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
- struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_MESSENGER_MemberSession *session,
- const struct GNUNET_MESSENGER_Message *message,
- const struct GNUNET_HashCode *hash)
+notify_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
+ struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_MESSENGER_MemberSession
*session,
+ const struct GNUNET_MESSENGER_Message *message,
+ const struct GNUNET_HashCode *hash)
{
GNUNET_assert((handle) && (room) && (session) && (message) && (hash));
- const struct GNUNET_HashCode *key = get_room_key(room);
+ const struct GNUNET_HashCode *key = get_srv_room_key(room);
- if ((!handle->mq) || (!get_handle_member_id (handle, key)))
+ if ((!handle->mq) || (!get_srv_handle_member_id (handle, key)))
{
GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Notifying client about message
requires membership!\n");
return;
@@ -554,7 +554,7 @@ notify_handle_message (struct GNUNET_MESSENGER_SrvHandle
*handle,
{
private_message = copy_message(message);
- if (GNUNET_YES != decrypt_message(private_message,
&(get_handle_ego(handle)->priv)))
+ if (GNUNET_YES != decrypt_message(private_message,
&(get_srv_handle_ego(handle)->priv)))
{
destroy_message(private_message);
private_message = NULL;
@@ -612,7 +612,7 @@ callback_scan_for_rooms (void *cls,
if ((GNUNET_OK == GNUNET_CONFIGURATION_get_data (cfg, "room", "key", &key,
sizeof(key))) &&
(GNUNET_OK == GNUNET_CONFIGURATION_get_data (cfg, "room", "member_id",
&member_id, sizeof(member_id))))
- change_handle_member_id (handle, &key, &member_id);
+ change_srv_handle_member_id (handle, &key, &member_id);
}
GNUNET_CONFIGURATION_destroy (cfg);
@@ -620,12 +620,12 @@ callback_scan_for_rooms (void *cls,
}
void
-load_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle)
+load_srv_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert(handle);
char *id_dir;
- get_handle_data_subdir (handle, handle->name, &id_dir);
+ get_srv_handle_data_subdir (handle, handle->name, &id_dir);
if (GNUNET_YES == GNUNET_DISK_directory_test (id_dir, GNUNET_YES))
{
@@ -650,7 +650,7 @@ iterate_save_rooms (void *cls,
struct GNUNET_ShortHashCode *member_id = value;
char *id_dir;
- get_handle_data_subdir (handle, handle->name, &id_dir);
+ get_srv_handle_data_subdir (handle, handle->name, &id_dir);
char *filename;
GNUNET_asprintf (&filename, "%s%s%c%s.cfg", id_dir, "rooms", DIR_SEPARATOR,
GNUNET_h2s (key));
@@ -687,12 +687,12 @@ iterate_save_rooms (void *cls,
}
void
-save_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle)
+save_srv_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert(handle);
char *id_dir;
- get_handle_data_subdir (handle, handle->name, &id_dir);
+ get_srv_handle_data_subdir (handle, handle->name, &id_dir);
if ((GNUNET_YES == GNUNET_DISK_directory_test (id_dir, GNUNET_NO)) ||
(GNUNET_OK
== GNUNET_DISK_directory_create (id_dir)))
diff --git a/src/messenger/gnunet-service-messenger_handle.h
b/src/messenger/gnunet-service-messenger_handle.h
index 4438570b9..8754716e9 100644
--- a/src/messenger/gnunet-service-messenger_handle.h
+++ b/src/messenger/gnunet-service-messenger_handle.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -60,8 +60,8 @@ struct GNUNET_MESSENGER_SrvHandle
* @return New handle
*/
struct GNUNET_MESSENGER_SrvHandle*
-create_handle (struct GNUNET_MESSENGER_Service *service,
- struct GNUNET_MQ_Handle *mq);
+create_srv_handle (struct GNUNET_MESSENGER_Service *service,
+ struct GNUNET_MQ_Handle *mq);
/**
* Destroys a handle and frees its memory fully.
@@ -69,7 +69,7 @@ create_handle (struct GNUNET_MESSENGER_Service *service,
* @param[in/out] handle Handle
*/
void
-destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
+destroy_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
/**
* Writes the path of the directory for a given <i>handle</i> using a specific
<i>name</i> to the parameter
@@ -80,7 +80,7 @@ destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
* @param[out] dir Path to store data
*/
void
-get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
+get_srv_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
const char *name,
char **dir);
@@ -94,8 +94,8 @@ get_handle_data_subdir (const struct
GNUNET_MESSENGER_SrvHandle *handle,
* @return Member id or NULL
*/
const struct GNUNET_ShortHashCode*
-get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key);
+get_srv_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key);
/**
* Changes the member id of a given <i>handle</i> in a specific <i>room</i> to
match a <i>unique_id</i>
@@ -109,9 +109,9 @@ get_handle_member_id (const struct
GNUNET_MESSENGER_SrvHandle *handle,
* @return GNUNET_OK on success, otherwise GNUNET_SYSERR
*/
int
-change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key,
- const struct GNUNET_ShortHashCode *unique_id);
+change_srv_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key,
+ const struct GNUNET_ShortHashCode *unique_id);
/**
* Sets the EGO used by a given <i>handle</i>.
@@ -120,8 +120,8 @@ change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle
*handle,
* @param[in] ego EGO key pair
*/
void
-set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_MESSENGER_Ego *ego);
+set_srv_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_MESSENGER_Ego *ego);
/**
* Returns the EGO used by a given <i>handle</i>.
@@ -130,7 +130,7 @@ set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
* @return EGO key pair
*/
const struct GNUNET_MESSENGER_Ego*
-get_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle);
+get_srv_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle);
/**
* Tries to set the name and EGO key of a <i>handle</i> initially by looking
up a specific <i>name</i>.
@@ -139,8 +139,8 @@ get_handle_ego (const struct GNUNET_MESSENGER_SrvHandle
*handle);
* @param[in] name Name (optionally: valid EGO name)
*/
void
-setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
- const char *name);
+setup_srv_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const char *name);
/**
* Tries to change the key pair of an EGO of a <i>handle</i> under the same
name and informs all rooms
@@ -149,7 +149,7 @@ setup_handle_name (struct GNUNET_MESSENGER_SrvHandle
*handle,
* @param[in/out] handle Handle
*/
void
-update_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
+update_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
/**
* Tries to rename the handle which implies renaming the EGO its using and
moving all related data into
@@ -161,8 +161,8 @@ update_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
* @param[in] name New name
*/
void
-set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
- const char *name);
+set_srv_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const char *name);
/**
* Makes a given <i>handle</i> a member of the room using a specific
<i>key</i> and opens the
@@ -173,8 +173,8 @@ set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
* @return #GNUNET_YES on success, otherwise #GNUNET_NO
*/
int
-open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key);
+open_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key);
/**
* Makes a given <i>handle</i> a member of the room using a specific
<i>key</i> and enters the room
@@ -186,9 +186,9 @@ open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
* @return #GNUNET_YES on success, otherwise #GNUNET_NO
*/
int
-entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_PeerIdentity *door,
- const struct GNUNET_HashCode *key);
+entry_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_PeerIdentity *door,
+ const struct GNUNET_HashCode *key);
/**
* Removes the membership of the room using a specific <i>key</i> and closes
it if no other handle
@@ -199,8 +199,8 @@ entry_handle_room (struct GNUNET_MESSENGER_SrvHandle
*handle,
* @return #GNUNET_YES on success, otherwise #GNUNET_NO
*/
int
-close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key);
+close_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key);
/**
* Sends a <i>message</i> from a given <i>handle</i> to the room using a
specific <i>key</i>.
@@ -211,9 +211,9 @@ close_handle_room (struct GNUNET_MESSENGER_SrvHandle
*handle,
* @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise.
*/
int
-send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key,
- const struct GNUNET_MESSENGER_Message *message);
+send_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key,
+ const struct GNUNET_MESSENGER_Message *message);
/**
* Notifies the handle that a new message was received or sent.
@@ -225,11 +225,11 @@ send_handle_message (struct GNUNET_MESSENGER_SrvHandle
*handle,
* @param[in] hash Hash of message
*/
void
-notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
- struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_MESSENGER_MemberSession *session,
- const struct GNUNET_MESSENGER_Message *message,
- const struct GNUNET_HashCode *hash);
+notify_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
+ struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_MESSENGER_MemberSession
*session,
+ const struct GNUNET_MESSENGER_Message *message,
+ const struct GNUNET_HashCode *hash);
/**
* Loads member ids and other potential configuration from a given
<i>handle</i> which
@@ -238,7 +238,7 @@ notify_handle_message (struct GNUNET_MESSENGER_SrvHandle
*handle,
* @param[out] handle Handle
*/
void
-load_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
+load_srv_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
/**
* Saves member ids and other potential configuration from a given
<i>handle</i> which
@@ -247,6 +247,6 @@ load_handle_configuration (struct
GNUNET_MESSENGER_SrvHandle *handle);
* @param[in] handle Handle
*/
void
-save_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
+save_srv_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
#endif //GNUNET_SERVICE_MESSENGER_HANDLE_H
diff --git a/src/messenger/gnunet-service-messenger_list_handles.c
b/src/messenger/gnunet-service-messenger_list_handles.c
index c0ae18716..f2daa2e70 100644
--- a/src/messenger/gnunet-service-messenger_list_handles.c
+++ b/src/messenger/gnunet-service-messenger_list_handles.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -46,7 +46,7 @@ clear_list_handles (struct GNUNET_MESSENGER_ListHandles
*handles)
struct GNUNET_MESSENGER_ListHandle *element = handles->head;
GNUNET_CONTAINER_DLL_remove(handles->head, handles->tail, element);
- destroy_handle (element->handle);
+ destroy_srv_handle (element->handle);
GNUNET_free(element);
}
@@ -97,7 +97,7 @@ find_list_handle_by_member (const struct
GNUNET_MESSENGER_ListHandles *handles,
struct GNUNET_MESSENGER_ListHandle *element;
for (element = handles->head; element; element = element->next)
- if (get_handle_member_id ((struct GNUNET_MESSENGER_SrvHandle*)
element->handle, key))
+ if (get_srv_handle_member_id ((struct GNUNET_MESSENGER_SrvHandle*)
element->handle, key))
return element->handle;
return NULL;
diff --git a/src/messenger/gnunet-service-messenger_member_session.c
b/src/messenger/gnunet-service-messenger_member_session.c
index 6bd1d24b8..d71513046 100644
--- a/src/messenger/gnunet-service-messenger_member_session.c
+++ b/src/messenger/gnunet-service-messenger_member_session.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -101,7 +101,7 @@ check_member_session_completion (struct
GNUNET_MESSENGER_MemberSession *session)
add_to_list_messages(&level, end);
- struct GNUNET_MESSENGER_MessageStore *store =
get_room_message_store(session->member->store->room);
+ struct GNUNET_MESSENGER_MessageStore *store =
get_srv_room_message_store(session->member->store->room);
struct GNUNET_MESSENGER_ListMessages list;
init_list_messages(&list);
diff --git a/src/messenger/gnunet-service-messenger_member_store.c
b/src/messenger/gnunet-service-messenger_member_store.c
index e96ee3883..844130429 100644
--- a/src/messenger/gnunet-service-messenger_member_store.c
+++ b/src/messenger/gnunet-service-messenger_member_store.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -74,7 +74,7 @@ get_member_store_key (const struct
GNUNET_MESSENGER_MemberStore *store)
{
GNUNET_assert (store);
- return get_room_key((const struct GNUNET_MESSENGER_SrvRoom*) store->room);
+ return get_srv_room_key((const struct GNUNET_MESSENGER_SrvRoom*)
store->room);
}
static int
diff --git a/src/messenger/gnunet-service-messenger_message_handle.c
b/src/messenger/gnunet-service-messenger_message_handle.c
index 701d78c89..6016ce438 100644
--- a/src/messenger/gnunet-service-messenger_message_handle.c
+++ b/src/messenger/gnunet-service-messenger_message_handle.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -43,12 +43,12 @@ handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_HashCode *hash)
{
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Member (%s) joins room (%s).\n",
- GNUNET_sh2s (&(message->header.sender_id)),
GNUNET_h2s(get_room_key(room)));
+ GNUNET_sh2s (&(message->header.sender_id)),
GNUNET_h2s(get_srv_room_key(room)));
if (GNUNET_OK != reset_member_session(session, hash))
GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Resetting member session failed!\n");
- solve_room_member_collisions (
+ solve_srv_room_member_collisions (
room,
&(message->body.join.key),
&(message->header.sender_id),
@@ -63,7 +63,7 @@ handle_message_leave (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_HashCode *hash)
{
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Member (%s) leaves room (%s).\n",
- GNUNET_sh2s (&(message->header.sender_id)),
GNUNET_h2s(get_room_key(room)));
+ GNUNET_sh2s (&(message->header.sender_id)),
GNUNET_h2s(get_srv_room_key(room)));
close_member_session(session);
}
@@ -101,7 +101,7 @@ handle_message_peer (struct GNUNET_MESSENGER_SrvRoom *room,
add_to_list_tunnels (&(room->basement), &(message->body.peer.peer));
if (room->peer_message)
- rebuild_room_basement_structure (room);
+ rebuild_srv_room_basement_structure (room);
}
void
@@ -112,7 +112,7 @@ handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room,
{
handle_session_switch (session, message, hash);
- solve_room_member_collisions (
+ solve_srv_room_member_collisions (
room,
get_member_session_public_key(session),
&(message->body.id.id),
@@ -134,7 +134,7 @@ handle_message_miss (struct GNUNET_MESSENGER_SrvRoom *room,
remove_from_list_tunnels (&(room->basement), element);
if (room->peer_message)
- rebuild_room_basement_structure (room);
+ rebuild_srv_room_basement_structure (room);
}
void
@@ -149,5 +149,5 @@ handle_message_delete (struct GNUNET_MESSENGER_SrvRoom
*room,
action = GNUNET_TIME_absolute_add (action, delay);
delay = GNUNET_TIME_absolute_get_difference (GNUNET_TIME_absolute_get (),
action);
- delete_room_message (room, session, &(message->body.deletion.hash), delay);
+ delete_srv_room_message (room, session, &(message->body.deletion.hash),
delay);
}
diff --git a/src/messenger/gnunet-service-messenger_message_recv.c
b/src/messenger/gnunet-service-messenger_message_recv.c
index bb6ee6f17..4e96cf552 100644
--- a/src/messenger/gnunet-service-messenger_message_recv.c
+++ b/src/messenger/gnunet-service-messenger_message_recv.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -36,7 +36,7 @@ forward_about_members (struct GNUNET_MESSENGER_SrvRoom *room,
if (session->prev)
forward_about_members (room, tunnel, session->prev, map);
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
struct GNUNET_MESSENGER_ListMessage *element;
for (element = session->messages.head; element; element = element->next)
@@ -92,7 +92,7 @@ recv_message_info (struct GNUNET_MESSENGER_SrvRoom *room,
if (room->host)
{
- const struct GNUNET_MESSENGER_Ego *ego = get_handle_ego(room->host);
+ const struct GNUNET_MESSENGER_Ego *ego = get_srv_handle_ego(room->host);
send_tunnel_message (tunnel, room->host, create_message_info(ego));
}
@@ -102,12 +102,12 @@ recv_message_info (struct GNUNET_MESSENGER_SrvRoom *room,
if (GNUNET_YES != contains_list_tunnels(&(room->basement), &peer))
{
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
iterate_store_members(member_store, iterate_forward_members, tunnel);
}
- check_room_peer_status(room, tunnel);
+ check_srv_room_peer_status(room, tunnel);
return GNUNET_NO;
}
@@ -142,7 +142,7 @@ callback_found_message (void *cls,
if (!message)
{
- struct GNUNET_MESSENGER_OperationStore *operation_store =
get_room_operation_store(room);
+ struct GNUNET_MESSENGER_OperationStore *operation_store =
get_srv_room_operation_store(room);
use_store_operation(
operation_store,
@@ -165,7 +165,7 @@ recv_message_request (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_MESSENGER_Message *message,
const struct GNUNET_HashCode *hash)
{
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = get_store_member_of(member_store,
message);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Request for message (%s)\n", GNUNET_h2s
(hash));
@@ -178,7 +178,7 @@ recv_message_request (struct GNUNET_MESSENGER_SrvRoom *room,
if ((!session) || (GNUNET_YES != check_member_session_history(session, hash,
GNUNET_NO)))
return GNUNET_NO;
- if (GNUNET_NO == request_room_message(room, &(message->body.request.hash),
session, callback_found_message, tunnel))
+ if (GNUNET_NO == request_srv_room_message(room,
&(message->body.request.hash), session, callback_found_message, tunnel))
return GNUNET_YES;
return GNUNET_NO;
diff --git a/src/messenger/gnunet-service-messenger_message_send.c
b/src/messenger/gnunet-service-messenger_message_send.c
index 8cc2466d7..5cb3cd627 100644
--- a/src/messenger/gnunet-service-messenger_message_send.c
+++ b/src/messenger/gnunet-service-messenger_message_send.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -35,7 +35,7 @@ send_message_join (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_MESSENGER_Message *message,
const struct GNUNET_HashCode *hash)
{
- check_room_peer_status(room, NULL);
+ check_srv_room_peer_status(room, NULL);
}
void
@@ -56,7 +56,7 @@ send_message_id (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_MESSENGER_Message *message,
const struct GNUNET_HashCode *hash)
{
- change_handle_member_id (handle, get_room_key(room), &(message->body.id.id));
+ change_srv_handle_member_id (handle, get_srv_room_key(room),
&(message->body.id.id));
}
void
@@ -65,7 +65,7 @@ send_message_request (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_MESSENGER_Message *message,
const struct GNUNET_HashCode *hash)
{
- struct GNUNET_MESSENGER_OperationStore *operation_store =
get_room_operation_store(room);
+ struct GNUNET_MESSENGER_OperationStore *operation_store =
get_srv_room_operation_store(room);
use_store_operation(
operation_store,
diff --git a/src/messenger/gnunet-service-messenger_room.c
b/src/messenger/gnunet-service-messenger_room.c
index 7a20d2191..068597f51 100644
--- a/src/messenger/gnunet-service-messenger_room.c
+++ b/src/messenger/gnunet-service-messenger_room.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -43,8 +43,8 @@ static void
idle_request_room_messages (void *cls);
struct GNUNET_MESSENGER_SrvRoom*
-create_room (struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_HashCode *key)
+create_srv_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_HashCode *key)
{
GNUNET_assert((handle) && (key));
@@ -58,9 +58,9 @@ create_room (struct GNUNET_MESSENGER_SrvHandle *handle,
room->tunnels = GNUNET_CONTAINER_multipeermap_create (8, GNUNET_NO);
- init_member_store(get_room_member_store(room), room);
- init_message_store (get_room_message_store(room));
- init_operation_store(get_room_operation_store(room), room);
+ init_member_store(get_srv_room_member_store(room), room);
+ init_message_store (get_srv_room_message_store(room));
+ init_operation_store(get_srv_room_operation_store(room), room);
init_list_tunnels (&(room->basement));
init_message_state(&(room->state));
@@ -71,7 +71,7 @@ create_room (struct GNUNET_MESSENGER_SrvHandle *handle,
room->idle = NULL;
if (room->service->dir)
- load_room (room);
+ load_srv_room (room);
room->idle = GNUNET_SCHEDULER_add_with_priority
(GNUNET_SCHEDULER_PRIORITY_IDLE, idle_request_room_messages, room);
@@ -92,8 +92,8 @@ static void
handle_room_messages (struct GNUNET_MESSENGER_SrvRoom *room);
void
-destroy_room (struct GNUNET_MESSENGER_SrvRoom *room,
- int deletion)
+destroy_srv_room (struct GNUNET_MESSENGER_SrvRoom *room,
+ int deletion)
{
GNUNET_assert(room);
@@ -113,14 +113,14 @@ destroy_room (struct GNUNET_MESSENGER_SrvRoom *room,
goto skip_saving;
if (GNUNET_YES == deletion)
- remove_room (room);
+ remove_srv_room (room);
else
- save_room (room);
+ save_srv_room (room);
skip_saving:
- clear_member_store (get_room_member_store(room));
- clear_message_store (get_room_message_store(room));
- clear_operation_store(get_room_operation_store(room));
+ clear_member_store (get_srv_room_member_store(room));
+ clear_message_store (get_srv_room_message_store(room));
+ clear_operation_store(get_srv_room_operation_store(room));
GNUNET_CONTAINER_multipeermap_destroy (room->tunnels);
clear_list_tunnels (&(room->basement));
@@ -133,7 +133,7 @@ skip_saving:
}
struct GNUNET_MESSENGER_MemberStore*
-get_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room)
+get_srv_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -141,7 +141,7 @@ get_room_member_store (struct GNUNET_MESSENGER_SrvRoom
*room)
}
struct GNUNET_MESSENGER_MessageStore*
-get_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room)
+get_srv_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -149,7 +149,7 @@ get_room_message_store (struct GNUNET_MESSENGER_SrvRoom
*room)
}
struct GNUNET_MESSENGER_OperationStore*
-get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room)
+get_srv_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -164,7 +164,7 @@ send_room_info (struct GNUNET_MESSENGER_SrvRoom *room,
if ((!handle) || (!is_tunnel_connected (tunnel)))
return GNUNET_NO;
- return send_tunnel_message (tunnel, handle, create_message_info
(get_handle_ego (handle)));
+ return send_tunnel_message (tunnel, handle, create_message_info
(get_srv_handle_ego (handle)));
}
static void*
@@ -193,7 +193,7 @@ callback_room_connect (void *cls,
bind_tunnel(tunnel, channel);
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "New tunnel in room (%s) established to
peer: %s\n",
- GNUNET_h2s(get_room_key(room)), GNUNET_i2s (source));
+ GNUNET_h2s(get_srv_room_key(room)), GNUNET_i2s (source));
if (GNUNET_YES == send_room_info (room, room->host, tunnel))
return tunnel;
@@ -213,15 +213,15 @@ join_room (struct GNUNET_MESSENGER_SrvRoom *room,
{
GNUNET_assert((room) && (handle) && (member));
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Joining room: %s (%s)\n", GNUNET_h2s
(get_room_key (room)),
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Joining room: %s (%s)\n", GNUNET_h2s
(get_srv_room_key (room)),
GNUNET_sh2s (get_member_id(member)));
const struct GNUNET_ShortHashCode *member_id = get_member_id(member);
- if (GNUNET_OK != change_handle_member_id (handle, get_room_key(room),
member_id))
+ if (GNUNET_OK != change_srv_handle_member_id (handle,
get_srv_room_key(room), member_id))
return GNUNET_NO;
- struct GNUNET_MESSENGER_Message *message = create_message_join
(get_handle_ego (handle));
+ struct GNUNET_MESSENGER_Message *message = create_message_join
(get_srv_handle_ego (handle));
if (!message)
{
@@ -231,7 +231,7 @@ join_room (struct GNUNET_MESSENGER_SrvRoom *room,
}
GNUNET_memcpy(&(message->header.sender_id), member_id, sizeof(*member_id));
- return send_room_message (room, handle, message);
+ return send_srv_room_message (room, handle, message);
}
struct GNUNET_MESSENGER_MemberNotify
@@ -250,7 +250,7 @@ notify_about_members (struct GNUNET_MESSENGER_MemberNotify
*notify,
if (session->prev)
notify_about_members (notify, session->prev, map, GNUNET_YES);
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(notify->room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(notify->room);
struct GNUNET_MESSENGER_ListMessage *element;
for (element = session->messages.head; element; element = element->next)
@@ -269,7 +269,7 @@ notify_about_members (struct GNUNET_MESSENGER_MemberNotify
*notify,
const struct GNUNET_MESSENGER_Message *message =
get_store_message(message_store, &(element->hash));
if (message)
- notify_handle_message (notify->handle, notify->room, session, message,
&(element->hash));
+ notify_srv_handle_message (notify->handle, notify->room, session,
message, &(element->hash));
}
}
@@ -295,15 +295,15 @@ static int
join_room_locally (struct GNUNET_MESSENGER_SrvRoom *room,
struct GNUNET_MESSENGER_SrvHandle *handle)
{
- const struct GNUNET_ShortHashCode *member_id = get_handle_member_id (handle,
get_room_key(room));
+ const struct GNUNET_ShortHashCode *member_id = get_srv_handle_member_id
(handle, get_srv_room_key(room));
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = add_store_member(member_store,
member_id);
if (GNUNET_NO == join_room (room, handle, member))
return GNUNET_NO;
- const struct GNUNET_MESSENGER_Ego *ego = get_handle_ego(handle);
+ const struct GNUNET_MESSENGER_Ego *ego = get_srv_handle_ego(handle);
struct GNUNET_MESSENGER_MemberSession *session = get_member_session (member,
&(ego->pub));
if (!session)
@@ -318,7 +318,7 @@ join_room_locally (struct GNUNET_MESSENGER_SrvRoom *room,
notify.handle = handle;
notify.session = session;
- iterate_store_members(get_room_member_store(room),
iterate_notify_about_members, ¬ify);
+ iterate_store_members(get_srv_room_member_store(room),
iterate_notify_about_members, ¬ify);
return GNUNET_YES;
}
@@ -336,16 +336,16 @@ callback_tunnel_disconnect (void *cls,
const struct GNUNET_CADET_Channel *channel);
int
-open_room (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle)
+open_srv_room (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert((room) && (handle));
if (room->port)
return join_room_locally (room, handle);
- struct GNUNET_CADET_Handle *cadet = get_room_cadet (room);
- const struct GNUNET_HashCode *key = get_room_key (room);
+ struct GNUNET_CADET_Handle *cadet = get_srv_room_cadet (room);
+ const struct GNUNET_HashCode *key = get_srv_room_key (room);
struct GNUNET_MQ_MessageHandler handlers[] = {
GNUNET_MQ_hd_var_size(tunnel_message, GNUNET_MESSAGE_TYPE_CADET_CLI,
struct
GNUNET_MessageHeader, NULL),
@@ -358,14 +358,14 @@ open_room (struct GNUNET_MESSENGER_SrvRoom *room,
if (room->port)
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Port of room (%s) was opened!\n",
- GNUNET_h2s(get_room_key(room)));
+ GNUNET_h2s(get_srv_room_key(room)));
else
GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Port of room (%s) could not be
opened!\n",
- GNUNET_h2s(get_room_key(room)));
+ GNUNET_h2s(get_srv_room_key(room)));
- const struct GNUNET_ShortHashCode *member_id = get_handle_member_id (handle,
get_room_key(room));
+ const struct GNUNET_ShortHashCode *member_id = get_srv_handle_member_id
(handle, get_srv_room_key(room));
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = add_store_member(member_store,
member_id);
if ((GNUNET_NO == join_room (room, handle, member)) && (room->port))
@@ -380,13 +380,13 @@ open_room (struct GNUNET_MESSENGER_SrvRoom *room,
struct GNUNET_MESSENGER_Message *peer_msg = create_message_peer
(room->service);
GNUNET_memcpy(&(peer_msg->header.sender_id), member_id, sizeof(*member_id));
- return (room->port ? send_room_message (room, handle, peer_msg) : GNUNET_NO);
+ return (room->port ? send_srv_room_message (room, handle, peer_msg) :
GNUNET_NO);
}
int
-enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_PeerIdentity *door)
+enter_srv_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_PeerIdentity *door)
{
GNUNET_assert((room) && (handle) && (door));
@@ -423,24 +423,24 @@ enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
}
struct GNUNET_MQ_Envelope*
-pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_MESSENGER_SrvHandle *handle,
- struct GNUNET_MESSENGER_Message *message,
- struct GNUNET_HashCode *hash,
- int mode)
+pack_srv_room_message (const struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_MESSENGER_SrvHandle *handle,
+ struct GNUNET_MESSENGER_Message *message,
+ struct GNUNET_HashCode *hash,
+ int mode)
{
GNUNET_assert((room) && (handle) && (message) && (hash));
message->header.timestamp = GNUNET_TIME_absolute_hton
(GNUNET_TIME_absolute_get ());
- const struct GNUNET_ShortHashCode *id = get_handle_member_id (handle,
get_room_key(room));
+ const struct GNUNET_ShortHashCode *id = get_srv_handle_member_id (handle,
get_srv_room_key(room));
GNUNET_assert(id);
GNUNET_memcpy(&(message->header.sender_id), id, sizeof(struct
GNUNET_ShortHashCode));
get_message_state_chain_hash (&(room->state), &(message->header.previous));
- return pack_message (message, hash, get_handle_ego (handle), mode);
+ return pack_message (message, hash, get_srv_handle_ego (handle), mode);
}
struct GNUNET_MESSENGER_ClosureSendRoom
@@ -473,7 +473,7 @@ iterate_send_room_message (void *cls,
if (closure->packed == GNUNET_NO)
{
- env = pack_room_message (closure->room, closure->handle, closure->message,
closure->hash,
+ env = pack_srv_room_message (closure->room, closure->handle,
closure->message, closure->hash,
GNUNET_MESSENGER_PACK_MODE_ENVELOPE);
if (env)
@@ -500,9 +500,9 @@ callback_room_handle_message (struct
GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_HashCode *hash);
int
-send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle,
- struct GNUNET_MESSENGER_Message *message)
+send_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle,
+ struct GNUNET_MESSENGER_Message *message)
{
GNUNET_assert((room) && (handle));
@@ -510,10 +510,10 @@ send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
return GNUNET_NO;
if (GNUNET_YES == is_message_session_bound(message))
- merge_room_last_messages(room, handle);
+ merge_srv_room_last_messages(room, handle);
GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Sending message from handle with member
id: %s\n",
- GNUNET_sh2s(get_handle_member_id(handle, get_room_key(room))));
+ GNUNET_sh2s(get_srv_handle_member_id(handle,
get_srv_room_key(room))));
struct GNUNET_HashCode hash;
struct GNUNET_MESSENGER_ClosureSendRoom closure;
@@ -528,7 +528,7 @@ send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
GNUNET_CONTAINER_multipeermap_iterate (room->tunnels,
iterate_send_room_message, &closure);
if (GNUNET_NO == closure.packed)
- pack_room_message (room, handle, message, &hash,
GNUNET_MESSENGER_PACK_MODE_UNKNOWN);
+ pack_srv_room_message (room, handle, message, &hash,
GNUNET_MESSENGER_PACK_MODE_UNKNOWN);
const int new_message = update_room_message (room, message, &hash);
@@ -558,10 +558,10 @@ send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
}
void
-forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvTunnel *tunnel,
- struct GNUNET_MESSENGER_Message *message,
- const struct GNUNET_HashCode *hash)
+forward_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvTunnel *tunnel,
+ struct GNUNET_MESSENGER_Message *message,
+ const struct GNUNET_HashCode *hash)
{
GNUNET_assert((room) && (tunnel));
@@ -584,13 +584,13 @@ forward_room_message (struct GNUNET_MESSENGER_SrvRoom
*room,
}
void
-check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvTunnel *tunnel)
+check_srv_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvTunnel *tunnel)
{
if (!room->peer_message)
return;
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
const struct GNUNET_MESSENGER_Message *message =
get_store_message(message_store, room->peer_message);
@@ -601,7 +601,7 @@ check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom
*room,
return;
}
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = get_store_member_of(member_store,
message);
if (!member)
@@ -619,12 +619,12 @@ check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom
*room,
resend_peer_message:
if (room->host)
- send_room_message (room, room->host, create_message_peer (room->service));
+ send_srv_room_message (room, room->host, create_message_peer
(room->service));
}
void
-merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle)
+merge_srv_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle)
{
GNUNET_assert(room);
@@ -639,7 +639,7 @@ merge_next:
if (!hash)
return;
- send_room_message (room, handle, create_message_merge (hash));
+ send_srv_room_message (room, handle, create_message_merge (hash));
goto merge_next;
}
@@ -647,7 +647,7 @@ void
callback_room_deletion (struct GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_HashCode *hash)
{
- if (GNUNET_OK != delete_store_message (get_room_message_store(room), hash))
+ if (GNUNET_OK != delete_store_message (get_srv_room_message_store(room),
hash))
{
GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Deletion of message failed!
(%s)\n", GNUNET_h2s(hash));
return;
@@ -661,14 +661,14 @@ callback_room_merge (struct GNUNET_MESSENGER_SrvRoom
*room,
if (!room->host)
return;
- send_room_message (room, room->host, create_message_merge (hash));
+ send_srv_room_message (room, room->host, create_message_merge (hash));
}
int
-delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_MemberSession *session,
- const struct GNUNET_HashCode *hash,
- const struct GNUNET_TIME_Relative delay)
+delete_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_MemberSession *session,
+ const struct GNUNET_HashCode *hash,
+ const struct GNUNET_TIME_Relative delay)
{
GNUNET_assert((room) && (session) && (hash));
@@ -680,7 +680,7 @@ delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
return GNUNET_SYSERR;
}
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
const struct GNUNET_MESSENGER_Message *message =
get_store_message(message_store, hash);
@@ -695,7 +695,7 @@ delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
return GNUNET_NO;
}
- struct GNUNET_MESSENGER_OperationStore *operation_store =
get_room_operation_store(room);
+ struct GNUNET_MESSENGER_OperationStore *operation_store =
get_srv_room_operation_store(room);
if (GNUNET_OK != use_store_operation(operation_store, hash,
GNUNET_MESSENGER_OP_DELETE, delay))
{
@@ -707,7 +707,7 @@ delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
}
struct GNUNET_CADET_Handle*
-get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room)
+get_srv_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -715,7 +715,7 @@ get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room)
}
const struct GNUNET_HashCode*
-get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room)
+get_srv_room_key (const struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -723,8 +723,8 @@ get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room)
}
const struct GNUNET_MESSENGER_SrvTunnel*
-get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_PeerIdentity *peer)
+get_srv_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_PeerIdentity *peer)
{
GNUNET_assert((room) && (peer));
@@ -738,7 +738,7 @@ request_room_message_step (struct GNUNET_MESSENGER_SrvRoom
*room,
GNUNET_MESSENGER_MessageRequestCallback callback,
void* cls)
{
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
const struct GNUNET_MESSENGER_MessageLink *link = get_store_message_link(
message_store, hash, GNUNET_YES
@@ -771,11 +771,11 @@ forward:
}
int
-request_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_HashCode *hash,
- const struct GNUNET_MESSENGER_MemberSession *session,
- GNUNET_MESSENGER_MessageRequestCallback callback,
- void* cls)
+request_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_HashCode *hash,
+ const struct GNUNET_MESSENGER_MemberSession *session,
+ GNUNET_MESSENGER_MessageRequestCallback callback,
+ void* cls)
{
GNUNET_assert((room) && (hash));
@@ -804,7 +804,7 @@ callback_room_disconnect (struct GNUNET_MESSENGER_SrvRoom
*room,
return;
if (GNUNET_YES == contains_list_tunnels (&(room->basement), &identity))
- send_room_message (room, room->host, create_message_miss (&identity));
+ send_srv_room_message (room, room->host, create_message_miss (&identity));
}
int
@@ -819,7 +819,7 @@ callback_verify_room_message (struct
GNUNET_MESSENGER_SrvRoom *room,
return GNUNET_SYSERR;
}
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
const struct GNUNET_MESSENGER_Message *previous =
get_store_message(message_store, &(message->header.previous));
@@ -849,7 +849,7 @@ idle_request_room_messages (void *cls)
room->idle = NULL;
- struct GNUNET_MESSENGER_OperationStore *operation_store =
get_room_operation_store(room);
+ struct GNUNET_MESSENGER_OperationStore *operation_store =
get_srv_room_operation_store(room);
const struct GNUNET_HashCode *hash =
get_message_state_merge_hash(&(room->state));
if ((hash) &&
@@ -870,14 +870,14 @@ idle_request_room_messages (void *cls)
}
void
-solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_IDENTITY_PublicKey
*public_key,
- const struct GNUNET_ShortHashCode *member_id,
- struct GNUNET_TIME_Absolute timestamp)
+solve_srv_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_IDENTITY_PublicKey
*public_key,
+ const struct GNUNET_ShortHashCode *member_id,
+ struct GNUNET_TIME_Absolute timestamp)
{
GNUNET_assert ((room) && (public_key) && (member_id));
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = get_store_member(member_store,
member_id);
if ((!member) || (1 >= GNUNET_CONTAINER_multihashmap_size(member->sessions)))
@@ -888,13 +888,13 @@ solve_room_member_collisions (struct
GNUNET_MESSENGER_SrvRoom *room,
for (element = handles->head; element; element = element->next)
{
- if (0 != GNUNET_memcmp(member_id, get_handle_member_id(element->handle,
get_room_key(room))))
+ if (0 != GNUNET_memcmp(member_id,
get_srv_handle_member_id(element->handle, get_srv_room_key(room))))
continue;
- if (0 == GNUNET_memcmp(public_key,
&(get_handle_ego(element->handle)->pub)))
+ if (0 == GNUNET_memcmp(public_key,
&(get_srv_handle_ego(element->handle)->pub)))
continue;
- struct GNUNET_MESSENGER_MemberSession *session =
get_member_session(member, &(get_handle_ego(element->handle)->pub));
+ struct GNUNET_MESSENGER_MemberSession *session =
get_member_session(member, &(get_srv_handle_ego(element->handle)->pub));
if (!session)
continue;
@@ -907,12 +907,12 @@ solve_room_member_collisions (struct
GNUNET_MESSENGER_SrvRoom *room,
struct GNUNET_ShortHashCode random_id;
generate_free_member_id (&random_id, member_store->members);
- send_room_message(room, element->handle, create_message_id(&random_id));
+ send_srv_room_message(room, element->handle,
create_message_id(&random_id));
}
}
void
-rebuild_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room)
+rebuild_srv_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -961,8 +961,8 @@ rebuild_room_basement_structure (struct
GNUNET_MESSENGER_SrvRoom *room)
static void
handle_room_messages (struct GNUNET_MESSENGER_SrvRoom *room)
{
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
while (room->handling.head)
{
@@ -996,7 +996,7 @@ update_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
{
GNUNET_assert((room) && (message) && (hash));
- struct GNUNET_MESSENGER_OperationStore *operation_store =
get_room_operation_store(room);
+ struct GNUNET_MESSENGER_OperationStore *operation_store =
get_srv_room_operation_store(room);
const int requested = (GNUNET_MESSENGER_OP_REQUEST ==
get_store_operation_type(operation_store, hash)?
GNUNET_YES : GNUNET_NO
@@ -1005,11 +1005,11 @@ update_room_message (struct GNUNET_MESSENGER_SrvRoom
*room,
if (GNUNET_YES == requested)
cancel_store_operation(operation_store, hash);
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(room);
const struct GNUNET_MESSENGER_Message *old_message = get_store_message
(message_store, hash);
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Handle a message in room (%s).\n",
GNUNET_h2s (get_room_key(room)));
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Handle a message in room (%s).\n",
GNUNET_h2s (get_srv_room_key(room)));
if ((old_message) || (GNUNET_OK != put_store_message (message_store, hash,
message)))
{
@@ -1087,7 +1087,7 @@ callback_room_handle_message (struct
GNUNET_MESSENGER_SrvRoom *room,
const struct GNUNET_MESSENGER_Message *message,
const struct GNUNET_HashCode *hash)
{
- struct GNUNET_MESSENGER_MemberStore *member_store =
get_room_member_store(room);
+ struct GNUNET_MESSENGER_MemberStore *member_store =
get_srv_room_member_store(room);
struct GNUNET_MESSENGER_Member *member = get_store_member_of(member_store,
message);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Callback for message (%s)\n",
GNUNET_h2s (hash));
@@ -1169,11 +1169,11 @@ get_room_data_subdir (struct GNUNET_MESSENGER_SrvRoom
*room,
{
GNUNET_assert((room) && (dir));
- GNUNET_asprintf (dir, "%s%s%c%s%c", room->service->dir, "rooms",
DIR_SEPARATOR, GNUNET_h2s (get_room_key(room)), DIR_SEPARATOR);
+ GNUNET_asprintf (dir, "%s%s%c%s%c", room->service->dir, "rooms",
DIR_SEPARATOR, GNUNET_h2s (get_srv_room_key(room)), DIR_SEPARATOR);
}
void
-load_room (struct GNUNET_MESSENGER_SrvRoom *room)
+load_srv_room (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -1182,9 +1182,9 @@ load_room (struct GNUNET_MESSENGER_SrvRoom *room)
if (GNUNET_YES == GNUNET_DISK_directory_test (room_dir, GNUNET_YES))
{
- load_member_store (get_room_member_store(room), room_dir);
- load_message_store (get_room_message_store(room), room_dir);
- load_operation_store(get_room_operation_store(room), room_dir);
+ load_member_store (get_srv_room_member_store(room), room_dir);
+ load_message_store (get_srv_room_message_store(room), room_dir);
+ load_operation_store(get_srv_room_operation_store(room), room_dir);
char *basement_file;
GNUNET_asprintf (&basement_file, "%s%s", room_dir, "basement.list");
@@ -1199,7 +1199,7 @@ load_room (struct GNUNET_MESSENGER_SrvRoom *room)
}
void
-save_room (struct GNUNET_MESSENGER_SrvRoom *room)
+save_srv_room (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
@@ -1209,9 +1209,9 @@ save_room (struct GNUNET_MESSENGER_SrvRoom *room)
if ((GNUNET_YES == GNUNET_DISK_directory_test (room_dir, GNUNET_NO)) ||
(GNUNET_OK == GNUNET_DISK_directory_create (room_dir)))
{
- save_member_store(get_room_member_store(room), room_dir);
- save_message_store (get_room_message_store(room), room_dir);
- save_operation_store(get_room_operation_store(room), room_dir);
+ save_member_store(get_srv_room_member_store(room), room_dir);
+ save_message_store (get_srv_room_message_store(room), room_dir);
+ save_operation_store(get_srv_room_operation_store(room), room_dir);
char *basement_file;
GNUNET_asprintf (&basement_file, "%s%s", room_dir, "basement.list");
@@ -1226,7 +1226,7 @@ save_room (struct GNUNET_MESSENGER_SrvRoom *room)
}
void
-remove_room (struct GNUNET_MESSENGER_SrvRoom *room)
+remove_srv_room (struct GNUNET_MESSENGER_SrvRoom *room)
{
GNUNET_assert(room);
diff --git a/src/messenger/gnunet-service-messenger_room.h
b/src/messenger/gnunet-service-messenger_room.h
index 58edc4121..a6ae45275 100644
--- a/src/messenger/gnunet-service-messenger_room.h
+++ b/src/messenger/gnunet-service-messenger_room.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -89,7 +89,7 @@ struct GNUNET_MESSENGER_SrvRoom
* @return New room
*/
struct GNUNET_MESSENGER_SrvRoom*
-create_room (struct GNUNET_MESSENGER_SrvHandle *handle,
+create_srv_room (struct GNUNET_MESSENGER_SrvHandle *handle,
const struct GNUNET_HashCode *key);
/**
@@ -102,7 +102,7 @@ create_room (struct GNUNET_MESSENGER_SrvHandle *handle,
* @param[in] deletion Flag to indicate context of destruction
*/
void
-destroy_room (struct GNUNET_MESSENGER_SrvRoom *room,
+destroy_srv_room (struct GNUNET_MESSENGER_SrvRoom *room,
int deletion);
/**
@@ -112,7 +112,7 @@ destroy_room (struct GNUNET_MESSENGER_SrvRoom *room,
* @return Member store
*/
struct GNUNET_MESSENGER_MemberStore*
-get_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room);
+get_srv_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Returns the used message store of a given <i>room</i>.
@@ -121,7 +121,7 @@ get_room_member_store (struct GNUNET_MESSENGER_SrvRoom
*room);
* @return Message store
*/
struct GNUNET_MESSENGER_MessageStore*
-get_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room);
+get_srv_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Returns the used operation store of a given <i>room</i>.
@@ -130,7 +130,7 @@ get_room_message_store (struct GNUNET_MESSENGER_SrvRoom
*room);
* @return Operation store
*/
struct GNUNET_MESSENGER_OperationStore*
-get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room);
+get_srv_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Tries to open a <i>room</i> for a given <i>handle</i>. If the room has
already been opened, the handle
@@ -145,8 +145,8 @@ get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom
*room);
* @return #GNUNET_YES on success, #GNUNET_NO on failure.
*/
int
-open_room (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle);
+open_srv_room (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle);
/**
* Connects a tunnel to a hosting peer of a <i>room</i> through a so called
<i>door</i> which is represented by
@@ -159,9 +159,9 @@ open_room (struct GNUNET_MESSENGER_SrvRoom *room,
* @return #GNUNET_YES on success, #GNUNET_NO on failure.
*/
int
-enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle,
- const struct GNUNET_PeerIdentity *door);
+enter_srv_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle,
+ const struct GNUNET_PeerIdentity *door);
/**
* Packs a <i>message</i> depending on the selected <i>mode</i> into a newly
allocated envelope. It will set the
@@ -181,11 +181,11 @@ enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
* @return New envelope or NULL
*/
struct GNUNET_MQ_Envelope*
-pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_MESSENGER_SrvHandle *handle,
- struct GNUNET_MESSENGER_Message *message,
- struct GNUNET_HashCode *hash,
- int mode);
+pack_srv_room_message (const struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_MESSENGER_SrvHandle *handle,
+ struct GNUNET_MESSENGER_Message *message,
+ struct GNUNET_HashCode *hash,
+ int mode);
/**
* Sends a <i>message</i> from a given <i>handle</i> into a <i>room</i>. The
<i>hash</i> parameter will be
@@ -203,9 +203,9 @@ pack_room_message (const struct GNUNET_MESSENGER_SrvRoom
*room,
* @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise.
*/
int
-send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle,
- struct GNUNET_MESSENGER_Message *message);
+send_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle,
+ struct GNUNET_MESSENGER_Message *message);
/**
* Forwards a <i>message</i> with a given <i>hash</i> to a specific
<i>tunnel</i> inside of a <i>room</i>.
@@ -216,10 +216,10 @@ send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
* @param[in] hash Hash of message
*/
void
-forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvTunnel *tunnel,
- struct GNUNET_MESSENGER_Message *message,
- const struct GNUNET_HashCode *hash);
+forward_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvTunnel *tunnel,
+ struct GNUNET_MESSENGER_Message *message,
+ const struct GNUNET_HashCode *hash);
/**
* Checks the current state of opening a given <i>room</i> from this peer and
re-publishes it
@@ -230,8 +230,8 @@ forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
* @param[in/out] tunnel Tunnel
*/
void
-check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvTunnel *tunnel);
+check_srv_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvTunnel *tunnel);
/**
* Reduces all current forks inside of the message history of a <i>room</i> to
one remaining last message
@@ -241,8 +241,8 @@ check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom
*room,
* @param[in/out] handle Handle
*/
void
-merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_SrvHandle *handle);
+merge_srv_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_SrvHandle *handle);
/**
* Deletes a message from the <i>room</i> with a given <i>hash</i> in a
specific <i>delay</i> if
@@ -255,10 +255,10 @@ merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom
*room,
* @return #GNUNET_YES on success, #GNUNET_NO if permission gets denied,
#GNUNET_SYSERR on operation failure
*/
int
-delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- struct GNUNET_MESSENGER_MemberSession *session,
- const struct GNUNET_HashCode *hash,
- const struct GNUNET_TIME_Relative delay);
+delete_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ struct GNUNET_MESSENGER_MemberSession *session,
+ const struct GNUNET_HashCode *hash,
+ const struct GNUNET_TIME_Relative delay);
/**
* Returns the CADET handle from a rooms service.
@@ -267,7 +267,7 @@ delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
* @return CADET handle
*/
struct GNUNET_CADET_Handle*
-get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room);
+get_srv_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Returns the shared secret you need to access a <i>room</i>.
@@ -276,7 +276,7 @@ get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room);
* @return Shared secret
*/
const struct GNUNET_HashCode*
-get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room);
+get_srv_room_key (const struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Returns a tunnel inside of a <i>room</i> leading towards a given
<i>peer</i> if such a tunnel exists,
@@ -287,8 +287,8 @@ get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room);
* @return Tunnel or NULL
*/
const struct GNUNET_MESSENGER_SrvTunnel*
-get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_PeerIdentity *peer);
+get_srv_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_PeerIdentity *peer);
/**
* Method called whenever a <i>message</i> is found during a request in a
<i>room</i>.
@@ -321,11 +321,11 @@ typedef void (GNUNET_MESSENGER_MessageRequestCallback) (
* @return #GNUNET_YES if the request could be processed, otherwise #GNUNET_NO
*/
int
-request_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_HashCode *hash,
- const struct GNUNET_MESSENGER_MemberSession *session,
- GNUNET_MESSENGER_MessageRequestCallback callback,
- void* cls);
+request_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_HashCode *hash,
+ const struct GNUNET_MESSENGER_MemberSession *session,
+ GNUNET_MESSENGER_MessageRequestCallback callback,
+ void* cls);
/**
* Checks for potential collisions with member ids and solves them changing
active handles ids if they
@@ -337,10 +337,10 @@ request_room_message (struct GNUNET_MESSENGER_SrvRoom
*room,
* @param[in] timestamp Timestamp
*/
void
-solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room,
- const struct GNUNET_IDENTITY_PublicKey
*public_key,
- const struct GNUNET_ShortHashCode *member_id,
- struct GNUNET_TIME_Absolute timestamp);
+solve_srv_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room,
+ const struct GNUNET_IDENTITY_PublicKey
*public_key,
+ const struct GNUNET_ShortHashCode *member_id,
+ struct GNUNET_TIME_Absolute timestamp);
/**
* Rebuilds the decentralized structure for a <i>room</i> by ensuring all
required connections are made
@@ -349,7 +349,7 @@ solve_room_member_collisions (struct
GNUNET_MESSENGER_SrvRoom *room,
* @param[in/out] room Room
*/
void
-rebuild_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room);
+rebuild_srv_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Loads the local configuration for a given <i>room</i> of a service which
contains the last messages hash
@@ -358,7 +358,7 @@ rebuild_room_basement_structure (struct
GNUNET_MESSENGER_SrvRoom *room);
* @param[out] room Room
*/
void
-load_room (struct GNUNET_MESSENGER_SrvRoom *room);
+load_srv_room (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Saves the configuration for a given <i>room</i> of a service which contains
the last messages hash
@@ -367,7 +367,7 @@ load_room (struct GNUNET_MESSENGER_SrvRoom *room);
* @param[in] room Room
*/
void
-save_room (struct GNUNET_MESSENGER_SrvRoom *room);
+save_srv_room (struct GNUNET_MESSENGER_SrvRoom *room);
/**
* Removes the configuration for a given <i>room</i> of a service.
@@ -375,6 +375,6 @@ save_room (struct GNUNET_MESSENGER_SrvRoom *room);
* @param[in] room Room
*/
void
-remove_room (struct GNUNET_MESSENGER_SrvRoom *room);
+remove_srv_room (struct GNUNET_MESSENGER_SrvRoom *room);
#endif //GNUNET_SERVICE_MESSENGER_ROOM_H
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 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -94,7 +94,7 @@ iterate_destroy_rooms (void *cls,
void *value)
{
struct GNUNET_MESSENGER_SrvRoom *room = value;
- destroy_room (room, GNUNET_NO);
+ destroy_srv_room (room, GNUNET_NO);
return GNUNET_YES;
}
@@ -159,7 +159,7 @@ add_service_handle (struct GNUNET_MESSENGER_Service
*service,
{
GNUNET_assert((service) && (mq));
- struct GNUNET_MESSENGER_SrvHandle *handle = create_handle (service, mq);
+ struct GNUNET_MESSENGER_SrvHandle *handle = create_srv_handle (service, mq);
if (handle)
{
@@ -179,7 +179,7 @@ remove_service_handle (struct GNUNET_MESSENGER_Service
*service,
return;
if (GNUNET_YES == remove_list_handle (&(service->handles), handle))
- destroy_handle (handle);
+ destroy_srv_handle (handle);
}
int
@@ -210,17 +210,17 @@ open_service_room (struct GNUNET_MESSENGER_Service
*service,
struct GNUNET_MESSENGER_SrvRoom *room = get_service_room (service, key);
if (room)
- return open_room (room, handle);
+ return open_srv_room (room, handle);
- room = create_room (handle, key);
+ room = create_srv_room (handle, key);
- if ((GNUNET_YES == open_room (room, handle)) &&
+ if ((GNUNET_YES == open_srv_room (room, handle)) &&
(GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (service->rooms,
key, room,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)))
return GNUNET_YES;
- destroy_room (room, GNUNET_YES);
+ destroy_srv_room (room, GNUNET_YES);
return GNUNET_NO;
}
@@ -236,15 +236,15 @@ entry_service_room (struct GNUNET_MESSENGER_Service
*service,
if (room)
{
- if (GNUNET_YES == enter_room_at (room, handle, door))
+ if (GNUNET_YES == enter_srv_room_at (room, handle, door))
return GNUNET_YES;
else
return GNUNET_NO;
}
- room = create_room (handle, key);
+ room = create_srv_room (handle, key);
- if ((GNUNET_YES == enter_room_at (room, handle, door)) &&
+ if ((GNUNET_YES == enter_srv_room_at (room, handle, door)) &&
(GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (service->rooms,
key, room,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)))
@@ -253,7 +253,7 @@ entry_service_room (struct GNUNET_MESSENGER_Service
*service,
}
else
{
- destroy_room (room, GNUNET_YES);
+ destroy_srv_room (room, GNUNET_YES);
return GNUNET_NO;
}
@@ -271,9 +271,9 @@ close_service_room (struct GNUNET_MESSENGER_Service
*service,
if (!room)
return GNUNET_NO;
- send_room_message (room, handle, create_message_leave ());
+ send_srv_room_message (room, handle, create_message_leave ());
- const struct GNUNET_ShortHashCode *id = get_handle_member_id (handle, key);
+ const struct GNUNET_ShortHashCode *id = get_srv_handle_member_id (handle,
key);
GNUNET_assert(id);
@@ -287,7 +287,7 @@ close_service_room (struct GNUNET_MESSENGER_Service
*service,
{
if (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove (service->rooms,
key, room))
{
- destroy_room (room, GNUNET_YES);
+ destroy_srv_room (room, GNUNET_YES);
return GNUNET_YES;
}
else
@@ -313,7 +313,7 @@ handle_service_message (struct GNUNET_MESSENGER_Service
*service,
while (element)
{
- notify_handle_message (element->handle, room, session, message, hash);
+ notify_srv_handle_message (element->handle, room, session, message, hash);
element = element->next;
}
}
diff --git a/src/messenger/gnunet-service-messenger_tunnel.c
b/src/messenger/gnunet-service-messenger_tunnel.c
index 45c10c1af..83973bbbe 100644
--- a/src/messenger/gnunet-service-messenger_tunnel.c
+++ b/src/messenger/gnunet-service-messenger_tunnel.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2020--2021 GNUnet e.V.
+ Copyright (C) 2020--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -157,13 +157,13 @@ static void
update_tunnel_last_message (struct GNUNET_MESSENGER_SrvTunnel *tunnel,
const struct GNUNET_HashCode *hash)
{
- struct GNUNET_MESSENGER_OperationStore *operation_store =
get_room_operation_store(tunnel->room);
+ struct GNUNET_MESSENGER_OperationStore *operation_store =
get_srv_room_operation_store(tunnel->room);
const int requested = (GNUNET_MESSENGER_OP_REQUEST ==
get_store_operation_type(operation_store, hash)?
GNUNET_YES : GNUNET_NO
);
- struct GNUNET_MESSENGER_MessageStore *message_store =
get_room_message_store(tunnel->room);
+ struct GNUNET_MESSENGER_MessageStore *message_store =
get_srv_room_message_store(tunnel->room);
const struct GNUNET_MESSENGER_Message *message =
get_store_message(message_store, hash);
@@ -221,7 +221,7 @@ handle_tunnel_message (void *cls, const struct
GNUNET_MessageHeader *header)
if (GNUNET_YES == forward_message)
{
- forward_room_message (tunnel->room, tunnel, &message, &hash);
+ forward_srv_room_message (tunnel->room, tunnel, &message, &hash);
callback_room_handle_message (tunnel->room, NULL, &message, &hash);
}
@@ -241,8 +241,8 @@ connect_tunnel (struct GNUNET_MESSENGER_SrvTunnel *tunnel)
const struct GNUNET_PeerIdentity *door = GNUNET_PEER_resolve2 (tunnel->peer);
- struct GNUNET_CADET_Handle *cadet = get_room_cadet (tunnel->room);
- const struct GNUNET_HashCode *key = get_room_key (tunnel->room);
+ struct GNUNET_CADET_Handle *cadet = get_srv_room_cadet (tunnel->room);
+ const struct GNUNET_HashCode *key = get_srv_room_key (tunnel->room);
struct GNUNET_MQ_MessageHandler handlers[] = {
GNUNET_MQ_hd_var_size(tunnel_message, GNUNET_MESSAGE_TYPE_CADET_CLI,
struct
GNUNET_MessageHeader, NULL),
@@ -323,7 +323,7 @@ send_tunnel_message (struct GNUNET_MESSENGER_SrvTunnel
*tunnel,
return GNUNET_NO;
struct GNUNET_HashCode hash;
- struct GNUNET_MQ_Envelope *env = pack_room_message (
+ struct GNUNET_MQ_Envelope *env = pack_srv_room_message (
tunnel->room, (struct GNUNET_MESSENGER_SrvHandle*) handle,
message, &hash, GNUNET_MESSENGER_PACK_MODE_ENVELOPE
);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -fix duplicate naming of functions in messenger,
gnunet <=