aboutsummaryrefslogtreecommitdiff
path: root/src/gnunet_chat_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnunet_chat_group.c')
-rw-r--r--src/gnunet_chat_group.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gnunet_chat_group.c b/src/gnunet_chat_group.c
index da4430c..e027b19 100644
--- a/src/gnunet_chat_group.c
+++ b/src/gnunet_chat_group.c
@@ -46,6 +46,10 @@ group_create(struct GNUNET_CHAT_Handle *handle,
46 topic? &topic_key : NULL 46 topic? &topic_key : NULL
47 ); 47 );
48 48
49 group->is_public = topic? GNUNET_YES : GNUNET_NO;
50 group->announcement = NULL;
51 group->search = NULL;
52
49 if (!group->context) 53 if (!group->context)
50 { 54 {
51 group_destroy (group); 55 group_destroy (group);
@@ -90,16 +94,20 @@ skip_context:
90 GNUNET_free(group); 94 GNUNET_free(group);
91} 95}
92 96
93void 97int
94GNUNET_CHAT_group_leave (struct GNUNET_CHAT_Group *group) 98GNUNET_CHAT_group_leave (struct GNUNET_CHAT_Group *group)
95{ 99{
96 if (!group) 100 if (!group)
97 return; 101 return GNUNET_SYSERR;
102
103 if (GNUNET_YES != handle_update_chat_group(group->handle, group, GNUNET_YES))
104 return GNUNET_SYSERR;
98 105
99 if (group->context) 106 if (group->context)
100 GNUNET_MESSENGER_close_room(group->context->room); 107 GNUNET_MESSENGER_close_room(group->context->room);
101 108
102 group_destroy(group); 109 group_destroy(group);
110 return GNUNET_OK;
103} 111}
104 112
105void 113void