#include "platform.h"#include "gnunet_messenger_service.h"#include "gnunet_protocols.h"#include "gnunet_util_lib.h"#include "gnunet-service-messenger.h"#include "gnunet-service-messenger_handle.h"#include "gnunet-service-messenger_message_state.h"#include "gnunet-service-messenger_room.h"#include "messenger_api_util.h"Go to the source code of this file.
Data Structures | |
| struct | GNUNET_MESSENGER_NextMemberId |
Functions | |
| struct GNUNET_MESSENGER_SrvHandle * | create_srv_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MQ_Handle *mq) |
| Creates and allocates a new handle related to a service and using a given mq (message queue). | |
| static enum GNUNET_GenericReturnValue | iterate_close_rooms (void *cls, const struct GNUNET_HashCode *key, void *value) |
| static enum GNUNET_GenericReturnValue | iterate_free_values (void *cls, const struct GNUNET_HashCode *key, void *value) |
| void | destroy_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle) |
| Destroys a handle and frees its memory fully. | |
| void | set_srv_handle_key (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_CRYPTO_BlindablePublicKey *key) |
| Sets the public key of a given handle. | |
| const struct GNUNET_CRYPTO_BlindablePublicKey * | get_srv_handle_key (const struct GNUNET_MESSENGER_SrvHandle *handle) |
| Returns the public key of a given handle. | |
| void | get_srv_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle, const char *name, char **dir) |
| Writes the path of the directory for a given handle using a specific name to the parameter dir. | |
| static enum GNUNET_GenericReturnValue | create_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key) |
| const struct GNUNET_ShortHashCode * | get_srv_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key) |
| Returns the member id of a given handle in a specific room. | |
| enum GNUNET_GenericReturnValue | change_srv_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, const struct GNUNET_ShortHashCode *unique_id) |
| Changes the member id of a given handle in a specific room to match a unique_id and returns GNUNET_OK on success. | |
| enum GNUNET_GenericReturnValue | open_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key) |
| Makes a given handle a member of the room using a specific key and opens the room from the handles service. | |
| enum GNUNET_GenericReturnValue | entry_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key) |
| Makes a given handle a member of the room using a specific key and enters the room through a tunnel to a peer identified by a given door (peer identity). | |
| enum GNUNET_GenericReturnValue | close_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key) |
| Removes the membership of the room using a specific key and closes it if no other handle from this service is still a member of it. | |
| enum GNUNET_GenericReturnValue | is_srv_handle_routing (const struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key) |
| Returns whether a given handle has enabled routing for a room using a specific key by opening that room. | |
| static enum GNUNET_GenericReturnValue | iterate_srv_handle_sync_finished (void *cls, const struct GNUNET_HashCode *key, void *value) |
| void | merge_srv_handle_room_to_sync (struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_SrvRoom *room) |
| Merges the latest hash from a specific room by a given handle until the message graph of the room is fully synced. | |
| void | sync_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, uint16_t response_type, const struct GNUNET_HashCode *key, const struct GNUNET_HashCode *previous, const struct GNUNET_HashCode *epoch, const struct GNUNET_PeerIdentity *door) |
| Starts merging message hashes until the state from a room of a given handle using a specific key is fully synced to then send a response using a specified response_type to the handles client with the latest known hash and epoch of a message in that room. | |
| enum GNUNET_GenericReturnValue | send_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, const struct GNUNET_MESSENGER_Message *message) |
| Sends a message from a given handle to the room using a specific key. | |
| static const struct GNUNET_HashCode * | get_next_member_session_context (const struct GNUNET_MESSENGER_SrvMemberSession *session) |
| static const struct GNUNET_MESSENGER_SrvMemberSession * | get_handle_member_session (struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_HashCode *key) |
| void | notify_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, const struct GNUNET_HashCode *epoch, enum GNUNET_GenericReturnValue recent) |
| Notifies the handle that a new message was received or sent. | |
| static enum GNUNET_GenericReturnValue | iterate_next_member_ids (void *cls, const struct GNUNET_HashCode *key, void *value) |
| static void | task_notify_srv_handle_member_id (void *cls) |
| void | notify_srv_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_ShortHashCode *member_id, enum GNUNET_GenericReturnValue reset) |
| Notifies the handle that a new member id needs to be used. | |
| struct GNUNET_MESSENGER_SrvHandle * create_srv_handle | ( | struct GNUNET_MESSENGER_Service * | service, |
| struct GNUNET_MQ_Handle * | mq | ||
| ) |
Creates and allocates a new handle related to a service and using a given mq (message queue).
| [in,out] | service | MESSENGER Service |
| [in,out] | mq | Message queue |
Definition at line 45 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_create(), GNUNET_new, GNUNET_NO, handle, mq, GNUNET_VPN_Handle::mq, and service.
Referenced by add_service_handle().
|
static |
Definition at line 69 of file gnunet-service-messenger_handle.c.
References close_service_room(), GNUNET_assert, GNUNET_NO, GNUNET_YES, handle, and key.
Referenced by destroy_srv_handle().
|
static |
Definition at line 85 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_free, GNUNET_YES, and value.
Referenced by close_srv_handle_room(), and destroy_srv_handle().
| void destroy_srv_handle | ( | struct GNUNET_MESSENGER_SrvHandle * | handle | ) |
Destroys a handle and frees its memory fully.
| [in,out] | handle | Handle |
Definition at line 97 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_free, GNUNET_SCHEDULER_cancel(), handle, iterate_close_rooms(), and iterate_free_values().
Referenced by clear_list_handles(), and remove_service_handle().
| void set_srv_handle_key | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_CRYPTO_BlindablePublicKey * | key | ||
| ) |
Sets the public key of a given handle.
| [out] | handle | Handle |
| [in] | key | Public key |
Definition at line 124 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_free, GNUNET_new, handle, and key.
Referenced by initialize_handle_via_key(), send_message_join(), and send_message_key().
| const struct GNUNET_CRYPTO_BlindablePublicKey * get_srv_handle_key | ( | const struct GNUNET_MESSENGER_SrvHandle * | handle | ) |
Returns the public key of a given handle.
| [in] | handle | Handle |
Definition at line 143 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, and handle.
Referenced by find_member_session_in_room(), get_handle_member_session(), handle_get_message(), initialize_service_handle(), and solve_srv_room_member_collisions().
| void get_srv_handle_data_subdir | ( | const struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const char * | name, | ||
| char ** | dir | ||
| ) |
Writes the path of the directory for a given handle using a specific name to the parameter dir.
This directory will be used to store data regarding the handle and its messages.
| [in] | handle | Handle |
| [in] | name | Potential name of the handle |
| [out] | dir | Path to store data |
Definition at line 152 of file gnunet-service-messenger_handle.c.
References dir, DIR_SEPARATOR, GNUNET_asprintf(), GNUNET_assert, handle, and name.
|
static |
Definition at line 168 of file gnunet-service-messenger_handle.c.
References generate_free_member_id(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_sh2s(), GNUNET_YES, handle, and key.
Referenced by entry_srv_handle_room(), and open_srv_handle_room().
| const struct GNUNET_ShortHashCode * get_srv_handle_member_id | ( | const struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_HashCode * | key | ||
| ) |
Returns the member id of a given handle in a specific room.
If the handle is not a member of the specific room, NULL gets returned.
| [in] | handle | Handle |
| [in] | key | Key of a room |
Definition at line 200 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), handle, and key.
Referenced by close_srv_handle_room(), entry_srv_handle_room(), find_list_handle_by_member(), get_handle_member_session(), handle_get_message(), handle_service_message(), iterate_srv_handle_sync_finished(), join_room_locally(), notify_srv_handle_message(), open_srv_handle_room(), open_srv_room(), send_srv_handle_message(), solve_srv_room_member_collisions(), and sync_srv_handle_room().
| enum GNUNET_GenericReturnValue change_srv_handle_member_id | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_HashCode * | key, | ||
| const struct GNUNET_ShortHashCode * | unique_id | ||
| ) |
Changes the member id of a given handle in a specific room to match a unique_id and returns GNUNET_OK on success.
The client connected to the handle will be informed afterwards automatically.
| [in,out] | handle | Handle |
| [in] | key | Key of a room |
| [in] | unique_id | Unique member id |
Definition at line 210 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_memcmp, GNUNET_memcpy, GNUNET_new, GNUNET_OK, GNUNET_sh2s(), GNUNET_SYSERR, handle, and key.
Referenced by find_member_session_in_room(), join_room(), and send_message_id().
| enum GNUNET_GenericReturnValue open_srv_handle_room | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_HashCode * | key | ||
| ) |
Makes a given handle a member of the room using a specific key and opens the room from the handles service.
| [in,out] | handle | Handle |
| [in] | key | Key of a room |
Definition at line 251 of file gnunet-service-messenger_handle.c.
References create_handle_member_id(), get_srv_handle_member_id(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE, GNUNET_NO, GNUNET_OK, GNUNET_YES, handle, key, and open_service_room().
Referenced by handle_room_open().
| enum GNUNET_GenericReturnValue entry_srv_handle_room | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_PeerIdentity * | door, | ||
| const struct GNUNET_HashCode * | key | ||
| ) |
Makes a given handle a member of the room using a specific key and enters the room through a tunnel to a peer identified by a given door (peer identity).
| [in,out] | handle | Handle |
| [in] | door | Peer identity |
| [in] | key | Key of a room |
Definition at line 271 of file gnunet-service-messenger_handle.c.
References create_handle_member_id(), entry_service_room(), get_srv_handle_member_id(), GNUNET_assert, GNUNET_NO, GNUNET_YES, handle, and key.
Referenced by handle_room_entry().
| enum GNUNET_GenericReturnValue close_srv_handle_room | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_HashCode * | key | ||
| ) |
Removes the membership of the room using a specific key and closes it if no other handle from this service is still a member of it.
| [in,out] | handle | Handle |
| [in] | key | Key of a room |
Definition at line 287 of file gnunet-service-messenger_handle.c.
References close_service_room(), get_srv_handle_member_id(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_get_multiple(), GNUNET_CONTAINER_multihashmap_remove_all(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_YES, handle, iterate_free_values(), key, and result.
Referenced by handle_room_close().
| enum GNUNET_GenericReturnValue is_srv_handle_routing | ( | const struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_HashCode * | key | ||
| ) |
Returns whether a given handle has enabled routing for a room using a specific key by opening that room.
| [in] | handle | Handle |
| [in] | key | Key of a room |
Definition at line 320 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_contains(), handle, and key.
Referenced by find_list_handle_by_member(), and rebuild_srv_room_basement_structure().
|
static |
Definition at line 330 of file gnunet-service-messenger_handle.c.
References GNUNET_MESSENGER_SrvHandleSync::door, GNUNET_MESSENGER_SrvHandleSync::epoch, get_message_state_chain_hash(), get_service_room(), get_srv_handle_member_id(), get_srv_room_message_store(), get_store_message_epoch(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_CLOSE, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_ENTRY, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_OPEN, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_SYNC, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_sh2s(), GNUNET_YES, handle, GNUNET_MESSENGER_SrvHandleSync::hash, key, GNUNET_VPN_Handle::mq, response, GNUNET_MESSENGER_SrvHandleSync::response_type, send_response(), GNUNET_MESSENGER_SrvRoom::state, and value.
Referenced by merge_srv_handle_room_to_sync(), and sync_srv_handle_room().
| void merge_srv_handle_room_to_sync | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| struct GNUNET_MESSENGER_SrvRoom * | room | ||
| ) |
Merges the latest hash from a specific room by a given handle until the message graph of the room is fully synced.
The function will be called automatically in case the given handle is actively syncing.
| [in,out] | handle | Handle |
| [in,out] | room | Room |
Definition at line 414 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_contains(), GNUNET_CONTAINER_multihashmap_get_multiple(), GNUNET_CONTAINER_multihashmap_remove_all(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_NO, GNUNET_YES, handle, iterate_srv_handle_sync_finished(), key, GNUNET_MESSENGER_SrvRoom::key, merge_srv_room_last_messages(), result, and GNUNET_MESSENGER_SrvRoom::sync.
Referenced by callback_srv_room_message_signed(), notify_srv_handle_message(), and sync_srv_handle_room().
| void sync_srv_handle_room | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| uint16_t | response_type, | ||
| const struct GNUNET_HashCode * | key, | ||
| const struct GNUNET_HashCode * | hash, | ||
| const struct GNUNET_HashCode * | epoch, | ||
| const struct GNUNET_PeerIdentity * | door | ||
| ) |
Starts merging message hashes until the state from a room of a given handle using a specific key is fully synced to then send a response using a specified response_type to the handles client with the latest known hash and epoch of a message in that room.
If the room does not contain other messages being accessible to the handle and older than the provided hash, the function returns the originally provided hash as fallback. Similar goes for the provided epoch and door identifier.
| [in,out] | handle | Handle |
| [in] | response_type | Type of response |
| [in] | key | Key of a room |
| [in] | prev | Known hash of a message |
| [in] | epoch | Known epoch in a room |
| [in] | door | Known door identity or NULL |
Definition at line 455 of file gnunet-service-messenger_handle.c.
References GNUNET_MESSENGER_SrvHandleSync::door, GNUNET_MESSENGER_SrvHandleSync::epoch, get_message_state_merge_hash(), get_service_peer_identity(), get_service_room(), get_srv_handle_member_id(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_new, GNUNET_OK, handle, GNUNET_MESSENGER_SrvHandleSync::hash, iterate_srv_handle_sync_finished(), key, GNUNET_MESSENGER_SrvRoom::key, merge_srv_handle_room_to_sync(), GNUNET_MESSENGER_SrvHandleSync::response_type, GNUNET_MESSENGER_SrvRoom::state, and GNUNET_MESSENGER_SrvRoom::sync.
Referenced by handle_room_close(), handle_room_entry(), handle_room_open(), and handle_room_sync().
| enum GNUNET_GenericReturnValue send_srv_handle_message | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| const struct GNUNET_HashCode * | key, | ||
| const struct GNUNET_MESSENGER_Message * | message | ||
| ) |
Sends a message from a given handle to the room using a specific key.
| [in,out] | handle | Handle |
| [in] | key | Key of a room |
| [in] | message | Message |
Definition at line 519 of file gnunet-service-messenger_handle.c.
References copy_message(), get_service_room(), get_srv_handle_member_id(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_h2s(), GNUNET_log, GNUNET_memcmp, GNUNET_NO, GNUNET_sh2s(), handle, GNUNET_MESSENGER_Message::header, id, key, msg, send_srv_room_message(), and GNUNET_MESSENGER_MessageHeader::sender_id.
Referenced by handle_send_message().
|
static |
Definition at line 572 of file gnunet-service-messenger_handle.c.
References get_member_session_context(), get_next_member_session_context(), GNUNET_assert, and GNUNET_MESSENGER_SrvMemberSession::next.
Referenced by get_next_member_session_context(), and notify_srv_handle_message().
|
static |
Definition at line 585 of file gnunet-service-messenger_handle.c.
References get_member_session(), get_srv_handle_key(), get_srv_handle_member_id(), get_srv_room_member_store(), get_store_member(), GNUNET_assert, GNUNET_ERROR_TYPE_WARNING, GNUNET_h2s(), GNUNET_log, handle, id, key, pubkey, and GNUNET_MESSENGER_Member::store.
Referenced by notify_srv_handle_message().
| void notify_srv_handle_message | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| struct GNUNET_MESSENGER_SrvRoom * | room, | ||
| const struct GNUNET_MESSENGER_SenderSession * | session, | ||
| const struct GNUNET_MESSENGER_Message * | message, | ||
| const struct GNUNET_HashCode * | hash, | ||
| const struct GNUNET_HashCode * | epoch, | ||
| enum GNUNET_GenericReturnValue | recent | ||
| ) |
Notifies the handle that a new message was received or sent.
| [in,out] | handle | Handle |
| [in] | room | Room of the message |
| [in] | session | Sender session |
| [in] | message | Message |
| [in] | hash | Hash of message |
| [in] | epoch | Hash of epoch |
| [in] | recent | Whether the message was recently received |
Definition at line 627 of file gnunet-service-messenger_handle.c.
References GNUNET_MESSENGER_Message::body, context, GNUNET_MESSENGER_MessageTalk::discourse, encode_message(), env, get_handle_member_session(), get_member_session_public_key(), get_member_subscription(), get_message_size(), get_message_state_merge_hash(), get_next_member_session_context(), get_srv_handle_member_id(), get_srv_room_key(), get_srv_room_member_store(), get_store_member(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_contains(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_RECV_MESSAGE, GNUNET_MESSENGER_FLAG_NONE, GNUNET_MESSENGER_FLAG_PEER, GNUNET_MESSENGER_FLAG_RECENT, GNUNET_MESSENGER_FLAG_SENT, GNUNET_MESSENGER_KIND_MERGE, GNUNET_MESSENGER_KIND_TALK, GNUNET_MESSENGER_name_of_kind(), GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_sh2s(), GNUNET_TIME_absolute_ntoh(), GNUNET_YES, handle, has_subscription_of_timestamp(), GNUNET_MESSENGER_Message::header, id, identity, is_peer_message(), key, GNUNET_MESSENGER_MessageHeader::kind, GNUNET_MESSENGER_SenderSession::member, merge_srv_handle_room_to_sync(), GNUNET_VPN_Handle::mq, msg, GNUNET_MESSENGER_SenderSession::peer, pubkey, GNUNET_MESSENGER_SrvRoom::state, GNUNET_MESSENGER_MessageBody::talk, GNUNET_MESSENGER_MessageHeader::timestamp, and timestamp().
Referenced by callback_found_message(), handle_service_message(), notify_about_members(), and traverse_epoch_session_message().
|
static |
Definition at line 772 of file gnunet-service-messenger_handle.c.
References env, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_CONNECTION_MEMBER_ID, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_sh2s(), GNUNET_YES, handle, GNUNET_MESSENGER_NextMemberId::id, key, GNUNET_VPN_Handle::mq, msg, GNUNET_MQ_Envelope::next, and value.
Referenced by task_notify_srv_handle_member_id().
|
static |
Definition at line 808 of file gnunet-service-messenger_handle.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_clear(), GNUNET_CONTAINER_multihashmap_iterate(), handle, and iterate_next_member_ids().
Referenced by notify_srv_handle_member_id().
| void notify_srv_handle_member_id | ( | struct GNUNET_MESSENGER_SrvHandle * | handle, |
| struct GNUNET_MESSENGER_SrvRoom * | room, | ||
| const struct GNUNET_ShortHashCode * | member_id, | ||
| enum GNUNET_GenericReturnValue | reset | ||
| ) |
Notifies the handle that a new member id needs to be used.
| [in,out] | handle | Handle |
| [in] | room | Room of the member |
| [in] | member_id | Member id |
| [in] | reset | Reset member session with join message |
Definition at line 824 of file gnunet-service-messenger_handle.c.
References get_srv_room_key(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_new, GNUNET_SCHEDULER_add_now(), GNUNET_sh2s(), GNUNET_YES, handle, GNUNET_MESSENGER_NextMemberId::id, key, reset, GNUNET_MESSENGER_NextMemberId::reset, and task_notify_srv_handle_member_id().
Referenced by join_room(), and solve_srv_room_member_collisions().