diff options
Diffstat (limited to 'src/chat/messenger.c')
-rw-r--r-- | src/chat/messenger.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/chat/messenger.c b/src/chat/messenger.c index c0f16be..c7eb033 100644 --- a/src/chat/messenger.c +++ b/src/chat/messenger.c | |||
@@ -74,6 +74,8 @@ _chat_messenger_message(void *cls, | |||
74 | { | 74 | { |
75 | MESSENGER_Application *app = (MESSENGER_Application*) cls; | 75 | MESSENGER_Application *app = (MESSENGER_Application*) cls; |
76 | 76 | ||
77 | pthread_mutex_lock(&(app->chat.mutex)); | ||
78 | |||
77 | const enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(message); | 79 | const enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(message); |
78 | const struct GNUNET_CHAT_Contact* sender = GNUNET_CHAT_message_get_sender(message); | 80 | const struct GNUNET_CHAT_Contact* sender = GNUNET_CHAT_message_get_sender(message); |
79 | 81 | ||
@@ -157,6 +159,8 @@ _chat_messenger_message(void *cls, | |||
157 | break; | 159 | break; |
158 | } | 160 | } |
159 | 161 | ||
162 | pthread_mutex_unlock(&(app->chat.mutex)); | ||
163 | |||
160 | return GNUNET_YES; | 164 | return GNUNET_YES; |
161 | } | 165 | } |
162 | 166 | ||