[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6660 - gnunet-gtk/src/plugins/chat
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6660 - gnunet-gtk/src/plugins/chat |
Date: |
Tue, 1 Apr 2008 16:09:37 -0600 (MDT) |
Author: nevans
Date: 2008-04-01 16:09:36 -0600 (Tue, 01 Apr 2008)
New Revision: 6660
Modified:
gnunet-gtk/src/plugins/chat/chat.c
gnunet-gtk/src/plugins/chat/chat.h
Log:
Modified: gnunet-gtk/src/plugins/chat/chat.c
===================================================================
--- gnunet-gtk/src/plugins/chat/chat.c 2008-04-01 22:09:25 UTC (rev 6659)
+++ gnunet-gtk/src/plugins/chat/chat.c 2008-04-01 22:09:36 UTC (rev 6660)
@@ -28,9 +28,6 @@
#include "chat.h"
-GNUNET_RSA_PublicKey pub_key;
-const struct GNUNET_RSA_PrivateKey *priv_key;
-
static struct GNUNET_ClientServerConnection *sock;
static struct GNUNET_Mutex *lock;
@@ -230,10 +227,9 @@
chat_cfg = cfg;
room_member_list = NULL;
- /*GNUNET_disable_entropy_gathering (); */
- /* FIXME: yes G, read key from disk */
- priv_key = GNUNET_RSA_create_key ();
- GNUNET_RSA_get_public_key (priv_key, &pub_key);
+
+ /*priv_key = GNUNET_RSA_create_key ();
+ GNUNET_RSA_get_public_key (priv_key, &pub_key);*/
sock = GNUNET_client_connection_create (chat_ectx, chat_cfg);
lock = GNUNET_mutex_create (GNUNET_NO);
@@ -298,14 +294,16 @@
client = GNUNET_malloc (sizeof (struct GNUNET_CHAT_gui_chat_client));
client->room_name = GNUNET_malloc (strlen (room_name));
strcpy (client->room_name, room_name);
+
+ client->priv_key = NULL;
+ client->priv_key = GNUNET_CHAT_initPrivateKey
(chat_ectx,chat_cfg,room_name,&client->pub_key);
-
/* We do a silly strdup later on member_info... either check for NULL or
only pass "" for member_info!! */
chatRoom =
- GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, &pub_key,
- priv_key, "", &receive_callback, client,
+ GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name,
&client->pub_key,
+ client->priv_key, "", &receive_callback, client,
&member_list_callback, client);
-
+
client->room = chatRoom;
client->chatFrame = newChatWindow;
client->number =
Modified: gnunet-gtk/src/plugins/chat/chat.h
===================================================================
--- gnunet-gtk/src/plugins/chat/chat.h 2008-04-01 22:09:25 UTC (rev 6659)
+++ gnunet-gtk/src/plugins/chat/chat.h 2008-04-01 22:09:36 UTC (rev 6660)
@@ -45,6 +45,8 @@
{
struct GNUNET_CHAT_gui_chat_client *next;
struct GNUNET_CHAT_gui_chat_client *prev;
+ GNUNET_RSA_PublicKey pub_key;
+ const struct GNUNET_RSA_PrivateKey *priv_key;
int number;
GtkWidget *chatFrame;
struct GNUNET_CHAT_Room *room;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6660 - gnunet-gtk/src/plugins/chat,
gnunet <=