diff options
Diffstat (limited to 'src/gnunet_chat_lib_intern.c')
-rw-r--r-- | src/gnunet_chat_lib_intern.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c index b977509..32af3c8 100644 --- a/src/gnunet_chat_lib_intern.c +++ b/src/gnunet_chat_lib_intern.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * @file gnunet_chat_lib_intern.c | 22 | * @file gnunet_chat_lib_intern.c |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <gnunet/gnunet_common.h> | ||
25 | #include <stdlib.h> | 26 | #include <stdlib.h> |
26 | 27 | ||
27 | #define GNUNET_UNUSED __attribute__ ((unused)) | 28 | #define GNUNET_UNUSED __attribute__ ((unused)) |
@@ -308,3 +309,37 @@ it_message_iterate_read_receipts (void *cls, | |||
308 | 309 | ||
309 | return GNUNET_YES; | 310 | return GNUNET_YES; |
310 | } | 311 | } |
312 | |||
313 | void | ||
314 | cont_update_attribute_with_status (void *cls, | ||
315 | int32_t success, | ||
316 | const char *emsg) | ||
317 | { | ||
318 | GNUNET_assert(cls); | ||
319 | |||
320 | struct GNUNET_CHAT_AttributeProcess *attributes = ( | ||
321 | (struct GNUNET_CHAT_AttributeProcess*) cls | ||
322 | ); | ||
323 | |||
324 | attributes->op = NULL; | ||
325 | |||
326 | struct GNUNET_CHAT_Handle *handle = attributes->handle; | ||
327 | |||
328 | if (GNUNET_SYSERR == success) | ||
329 | { | ||
330 | handle_send_internal_message( | ||
331 | handle, | ||
332 | NULL, | ||
333 | GNUNET_CHAT_KIND_WARNING, | ||
334 | emsg | ||
335 | ); | ||
336 | |||
337 | return; | ||
338 | } | ||
339 | |||
340 | GNUNET_CONTAINER_DLL_remove( | ||
341 | handle->attributes_head, | ||
342 | handle->attributes_tail, | ||
343 | attributes | ||
344 | ); | ||
345 | } | ||