diff options
Diffstat (limited to 'src/chat/messenger.c')
-rw-r--r-- | src/chat/messenger.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/chat/messenger.c b/src/chat/messenger.c index 6a3f0b9..f5aab78 100644 --- a/src/chat/messenger.c +++ b/src/chat/messenger.c | |||
@@ -82,24 +82,9 @@ _chat_messenger_message(void *cls, | |||
82 | const struct GNUNET_CHAT_Message *message) | 82 | const struct GNUNET_CHAT_Message *message) |
83 | { | 83 | { |
84 | MESSENGER_Application *app = (MESSENGER_Application*) cls; | 84 | MESSENGER_Application *app = (MESSENGER_Application*) cls; |
85 | |||
86 | pthread_mutex_lock(&(app->chat.mutex)); | 85 | pthread_mutex_lock(&(app->chat.mutex)); |
87 | 86 | ||
88 | const enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(message); | 87 | switch (GNUNET_CHAT_message_get_kind(message)) |
89 | const struct GNUNET_CHAT_Contact* sender = GNUNET_CHAT_message_get_sender(message); | ||
90 | |||
91 | struct GNUNET_TIME_Absolute time = GNUNET_CHAT_message_get_timestamp(message); | ||
92 | |||
93 | printf("- %d, %lu", kind, time.abs_value_us); | ||
94 | |||
95 | if (GNUNET_YES == GNUNET_CHAT_message_is_sent(message)) | ||
96 | printf(", [!]\n"); | ||
97 | else if (sender) | ||
98 | printf(", %s\n", GNUNET_CHAT_contact_get_name(sender)); | ||
99 | else | ||
100 | printf("\n"); | ||
101 | |||
102 | switch (kind) | ||
103 | { | 88 | { |
104 | case GNUNET_CHAT_KIND_WARNING: | 89 | case GNUNET_CHAT_KIND_WARNING: |
105 | application_call_message_event( | 90 | application_call_message_event( |
@@ -189,7 +174,6 @@ _chat_messenger_message(void *cls, | |||
189 | } | 174 | } |
190 | 175 | ||
191 | pthread_mutex_unlock(&(app->chat.mutex)); | 176 | pthread_mutex_unlock(&(app->chat.mutex)); |
192 | |||
193 | return GNUNET_YES; | 177 | return GNUNET_YES; |
194 | } | 178 | } |
195 | 179 | ||