diff options
Diffstat (limited to 'src/plugins/chat/chat.c')
-rw-r--r-- | src/plugins/chat/chat.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/plugins/chat/chat.c b/src/plugins/chat/chat.c index 2fe5f84e..33245eaf 100644 --- a/src/plugins/chat/chat.c +++ b/src/plugins/chat/chat.c | |||
@@ -190,8 +190,7 @@ receive_callback (void *cls, | |||
190 | 190 | ||
191 | static int | 191 | static int |
192 | member_list_callback (void *cls, const char *senderNick, | 192 | member_list_callback (void *cls, const char *senderNick, |
193 | int is_joining, | 193 | int is_joining, GNUNET_CronTime timestamp) |
194 | GNUNET_CronTime timestamp) | ||
195 | { | 194 | { |
196 | struct GNUNET_CHAT_gui_chat_client *client = cls; | 195 | struct GNUNET_CHAT_gui_chat_client *client = cls; |
197 | GtkWidget *chatnicklist; | 196 | GtkWidget *chatnicklist; |
@@ -207,7 +206,7 @@ member_list_callback (void *cls, const char *senderNick, | |||
207 | /* chatnicklist is the GtkTextView object */ | 206 | /* chatnicklist is the GtkTextView object */ |
208 | writearg.nick = senderNick; | 207 | writearg.nick = senderNick; |
209 | writearg.nickList = chatnicklist; | 208 | writearg.nickList = chatnicklist; |
210 | 209 | ||
211 | g_print ("received nick %s calling safe write call\n", writearg.nick); | 210 | g_print ("received nick %s calling safe write call\n", writearg.nick); |
212 | if (is_joining) | 211 | if (is_joining) |
213 | GNUNET_GTK_save_call (&write_nick_save_call, &writearg); | 212 | GNUNET_GTK_save_call (&write_nick_save_call, &writearg); |
@@ -227,9 +226,9 @@ init_chat (struct GNUNET_GE_Context *ectx, | |||
227 | chat_cfg = cfg; | 226 | chat_cfg = cfg; |
228 | room_member_list = NULL; | 227 | room_member_list = NULL; |
229 | 228 | ||
230 | 229 | ||
231 | /*priv_key = GNUNET_RSA_create_key (); | 230 | /*priv_key = GNUNET_RSA_create_key (); |
232 | GNUNET_RSA_get_public_key (priv_key, &pub_key);*/ | 231 | GNUNET_RSA_get_public_key (priv_key, &pub_key); */ |
233 | 232 | ||
234 | sock = GNUNET_client_connection_create (chat_ectx, chat_cfg); | 233 | sock = GNUNET_client_connection_create (chat_ectx, chat_cfg); |
235 | lock = GNUNET_mutex_create (GNUNET_NO); | 234 | lock = GNUNET_mutex_create (GNUNET_NO); |
@@ -294,16 +293,19 @@ create_chat_room_tab (char *room_name, char *nick) | |||
294 | client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client)); | 293 | client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client)); |
295 | client->room_name = GNUNET_malloc (strlen (room_name)); | 294 | client->room_name = GNUNET_malloc (strlen (room_name)); |
296 | strcpy (client->room_name, room_name); | 295 | strcpy (client->room_name, room_name); |
297 | 296 | ||
298 | client->priv_key = NULL; | 297 | client->priv_key = NULL; |
299 | client->priv_key = GNUNET_CHAT_initPrivateKey (chat_ectx,chat_cfg,room_name,&client->pub_key); | 298 | client->priv_key = |
299 | GNUNET_CHAT_initPrivateKey (chat_ectx, chat_cfg, room_name, | ||
300 | &client->pub_key); | ||
300 | 301 | ||
301 | /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ | 302 | /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ |
302 | chatRoom = | 303 | chatRoom = |
303 | GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, &client->pub_key, | 304 | GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, |
304 | client->priv_key, "", &receive_callback, client, | 305 | &client->pub_key, client->priv_key, "", |
305 | &member_list_callback, client); | 306 | &receive_callback, client, &member_list_callback, |
306 | 307 | client); | |
308 | |||
307 | client->room = chatRoom; | 309 | client->room = chatRoom; |
308 | client->chatFrame = newChatWindow; | 310 | client->chatFrame = newChatWindow; |
309 | client->number = | 311 | client->number = |