diff options
author | Jacki <jacki@thejackimonster.de> | 2024-02-10 23:34:12 +0100 |
---|---|---|
committer | Jacki <jacki@thejackimonster.de> | 2024-02-10 23:34:12 +0100 |
commit | 43485ce71b4eb227d934c5726bc234195e0cbafa (patch) | |
tree | f82abae899119b5a0e0bd62043243649bd0975e0 /src/gnunet_chat_handle_intern.c | |
parent | 7d43dc0a81ff20c11ae497fece2b414fd241a00c (diff) | |
download | libgnunetchat-43485ce71b4eb227d934c5726bc234195e0cbafa.tar.gz libgnunetchat-43485ce71b4eb227d934c5726bc234195e0cbafa.zip |
Implement blocking and unblocking via rejection tags
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat (limited to 'src/gnunet_chat_handle_intern.c')
-rw-r--r-- | src/gnunet_chat_handle_intern.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gnunet_chat_handle_intern.c b/src/gnunet_chat_handle_intern.c index 0818227..522275a 100644 --- a/src/gnunet_chat_handle_intern.c +++ b/src/gnunet_chat_handle_intern.c | |||
@@ -897,6 +897,13 @@ on_handle_message_callback(void *cls) | |||
897 | 897 | ||
898 | switch (message->msg->header.kind) | 898 | switch (message->msg->header.kind) |
899 | { | 899 | { |
900 | case GNUNET_MESSENGER_KIND_JOIN: | ||
901 | { | ||
902 | contact_update_join(contact, context, | ||
903 | &(message->hash), message->flags); | ||
904 | |||
905 | break; | ||
906 | } | ||
900 | case GNUNET_MESSENGER_KIND_KEY: | 907 | case GNUNET_MESSENGER_KIND_KEY: |
901 | { | 908 | { |
902 | contact_update_key(contact); | 909 | contact_update_key(contact); |
@@ -932,7 +939,7 @@ on_handle_message_callback(void *cls) | |||
932 | break; | 939 | break; |
933 | } | 940 | } |
934 | 941 | ||
935 | if (GNUNET_YES == contact->blocked) | 942 | if (GNUNET_YES == contact_is_blocked(contact, context)) |
936 | goto clear_dependencies; | 943 | goto clear_dependencies; |
937 | 944 | ||
938 | handle->msg_cb(handle->msg_cls, context, message); | 945 | handle->msg_cb(handle->msg_cls, context, message); |
@@ -1029,10 +1036,10 @@ on_handle_message (void *cls, | |||
1029 | { | 1036 | { |
1030 | message_update_msg (message, flags, msg); | 1037 | message_update_msg (message, flags, msg); |
1031 | 1038 | ||
1032 | if (message->flags & GNUNET_MESSENGER_FLAG_UPDATE) | 1039 | if (0 != (message->flags & GNUNET_MESSENGER_FLAG_UPDATE)) |
1033 | goto handle_callback; | ||
1034 | else | ||
1035 | return; | 1040 | return; |
1041 | |||
1042 | goto handle_callback; | ||
1036 | } | 1043 | } |
1037 | else if (msg->header.kind == GNUNET_MESSENGER_KIND_DELETE) | 1044 | else if (msg->header.kind == GNUNET_MESSENGER_KIND_DELETE) |
1038 | { | 1045 | { |