summaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_message_handle.c
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2021-03-20 13:53:23 +0100
committerTheJackiMonster <thejackimonster@gmail.com>2021-04-04 17:58:11 +0200
commitac3aa3cc3a617bc54ed8beb2b5a30c0b95483525 (patch)
tree6e0444e568722f18501746665a07dfa3434c7ad6 /src/messenger/gnunet-service-messenger_message_handle.c
parent2413977f917534aa24ef562a28da193a2cdaa343 (diff)
-multiple fixes and correction regarding messenger service
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -added message states to tunnels Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -fixed requests for deleted messages returning previous ones Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -added automatic solving of member id collissions Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -added light timestamp verification Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -fixed decoding asserts and member session forwarding Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -added permission check for member sessions during local join Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_handle.c')
-rw-r--r--src/messenger/gnunet-service-messenger_message_handle.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_handle.c b/src/messenger/gnunet-service-messenger_message_handle.c
index c22e51fbf..1d489310c 100644
--- a/src/messenger/gnunet-service-messenger_message_handle.c
+++ b/src/messenger/gnunet-service-messenger_message_handle.c
@@ -44,6 +44,13 @@ handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSEN
if (GNUNET_OK != reset_member_session(session, hash))
GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Resetting member session failed!\n");
+
+ solve_room_member_collisions (
+ room,
+ &(message->body.join.key),
+ &(message->header.sender_id),
+ GNUNET_TIME_absolute_ntoh(message->header.timestamp)
+ );
}
void
@@ -91,6 +98,13 @@ handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGE
const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
{
handle_session_switch (session, message, hash);
+
+ solve_room_member_collisions (
+ room,
+ get_member_session_public_key(session),
+ &(message->body.id.id),
+ GNUNET_TIME_absolute_ntoh(message->header.timestamp)
+ );
}
void