diff options
Diffstat (limited to 'src/plugins/chat/chat.c')
-rw-r--r-- | src/plugins/chat/chat.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/chat/chat.c b/src/plugins/chat/chat.c index 626b202e..2fe5f84e 100644 --- a/src/plugins/chat/chat.c +++ b/src/plugins/chat/chat.c | |||
@@ -28,9 +28,6 @@ | |||
28 | 28 | ||
29 | #include "chat.h" | 29 | #include "chat.h" |
30 | 30 | ||
31 | GNUNET_RSA_PublicKey pub_key; | ||
32 | const struct GNUNET_RSA_PrivateKey *priv_key; | ||
33 | |||
34 | static struct GNUNET_ClientServerConnection *sock; | 31 | static struct GNUNET_ClientServerConnection *sock; |
35 | 32 | ||
36 | static struct GNUNET_Mutex *lock; | 33 | static struct GNUNET_Mutex *lock; |
@@ -230,10 +227,9 @@ init_chat (struct GNUNET_GE_Context *ectx, | |||
230 | chat_cfg = cfg; | 227 | chat_cfg = cfg; |
231 | room_member_list = NULL; | 228 | room_member_list = NULL; |
232 | 229 | ||
233 | /*GNUNET_disable_entropy_gathering (); */ | 230 | |
234 | /* FIXME: yes G, read key from disk */ | 231 | /*priv_key = GNUNET_RSA_create_key (); |
235 | priv_key = GNUNET_RSA_create_key (); | 232 | GNUNET_RSA_get_public_key (priv_key, &pub_key);*/ |
236 | GNUNET_RSA_get_public_key (priv_key, &pub_key); | ||
237 | 233 | ||
238 | sock = GNUNET_client_connection_create (chat_ectx, chat_cfg); | 234 | sock = GNUNET_client_connection_create (chat_ectx, chat_cfg); |
239 | lock = GNUNET_mutex_create (GNUNET_NO); | 235 | lock = GNUNET_mutex_create (GNUNET_NO); |
@@ -298,14 +294,16 @@ create_chat_room_tab (char *room_name, char *nick) | |||
298 | client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client)); | 294 | client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client)); |
299 | client->room_name = GNUNET_malloc (strlen (room_name)); | 295 | client->room_name = GNUNET_malloc (strlen (room_name)); |
300 | strcpy (client->room_name, room_name); | 296 | strcpy (client->room_name, room_name); |
301 | 297 | ||
298 | client->priv_key = NULL; | ||
299 | client->priv_key = GNUNET_CHAT_initPrivateKey (chat_ectx,chat_cfg,room_name,&client->pub_key); | ||
302 | 300 | ||
303 | /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ | 301 | /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ |
304 | chatRoom = | 302 | chatRoom = |
305 | GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, &pub_key, | 303 | GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, &client->pub_key, |
306 | priv_key, "", &receive_callback, client, | 304 | client->priv_key, "", &receive_callback, client, |
307 | &member_list_callback, client); | 305 | &member_list_callback, client); |
308 | 306 | ||
309 | client->room = chatRoom; | 307 | client->room = chatRoom; |
310 | client->chatFrame = newChatWindow; | 308 | client->chatFrame = newChatWindow; |
311 | client->number = | 309 | client->number = |