aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-05-31 06:16:00 +0000
committerChristian Grothoff <christian@grothoff.org>2008-05-31 06:16:00 +0000
commit558fc5b60d5c0ac110dc1efa1830c742244339f3 (patch)
tree2f5726f4665c9ec03fbc372456384d761dae19a5
parenteb83d35c295f3fe50e82e1a158219e03db4a9f89 (diff)
downloadgnunet-gtk-558fc5b60d5c0ac110dc1efa1830c742244339f3.tar.gz
gnunet-gtk-558fc5b60d5c0ac110dc1efa1830c742244339f3.zip
adapting to new ns api
-rw-r--r--po/Makefile.in2
-rw-r--r--src/plugins/chat/chat.c61
-rw-r--r--src/plugins/chat/chat.h13
-rw-r--r--src/plugins/fs/collection.c18
-rw-r--r--src/plugins/fs/namespace.c15
-rw-r--r--src/plugins/fs/namespace.h1
-rw-r--r--src/plugins/fs/namespace_create.c4
-rw-r--r--src/plugins/fs/namespace_search.c10
-rw-r--r--src/plugins/fs/namespace_search.h1
9 files changed, 64 insertions, 61 deletions
diff --git a/po/Makefile.in b/po/Makefile.in
index 53c95031..ca9267b5 100644
--- a/po/Makefile.in
+++ b/po/Makefile.in
@@ -20,7 +20,7 @@ srcdir = .
20top_srcdir = .. 20top_srcdir = ..
21 21
22 22
23prefix = /home/grothoff 23prefix = /home/grothoff/
24exec_prefix = ${prefix} 24exec_prefix = ${prefix}
25datadir = ${prefix}/share 25datadir = ${prefix}/share
26localedir = $(datadir)/locale 26localedir = $(datadir)/locale
diff --git a/src/plugins/chat/chat.c b/src/plugins/chat/chat.c
index ab935b7d..33af07fe 100644
--- a/src/plugins/chat/chat.c
+++ b/src/plugins/chat/chat.c
@@ -28,6 +28,21 @@
28 28
29#include "chat.h" 29#include "chat.h"
30 30
31struct GNUNET_CHAT_safe_write_struct
32{
33 GtkWidget *chatWindow;
34 const char *message;
35 const GNUNET_HashCode *sender;
36};
37
38struct GNUNET_CHAT_safe_nick_write_struct
39{
40 GtkWidget *nickList;
41 const char *nick;
42};
43
44
45
31static struct GNUNET_ClientServerConnection *sock; 46static struct GNUNET_ClientServerConnection *sock;
32 47
33static struct GNUNET_Mutex *lock; 48static struct GNUNET_Mutex *lock;
@@ -52,11 +67,11 @@ write_save_call (void *arg)
52 67
53 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (writeholder->chatWindow)); 68 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (writeholder->chatWindow));
54 message_buf_size = 69 message_buf_size =
55 snprintf (NULL, 0, "<%s> %s", writeholder->senderNick, 70 snprintf (NULL, 0, "<> %s", /* writeholder->senderNick,*/
56 writeholder->message); 71 writeholder->message);
57 message_buf = GNUNET_malloc (message_buf_size + 2); 72 message_buf = GNUNET_malloc (message_buf_size + 2);
58 snprintf (message_buf, message_buf_size + 2, "<%s> %s\n", 73 snprintf (message_buf, message_buf_size + 2, "<FIXME> %s\n",
59 writeholder->senderNick, writeholder->message); 74 /*writeholder->senderNick,*/ writeholder->message);
60 gtk_text_buffer_insert_at_cursor (buffer, message_buf, 75 gtk_text_buffer_insert_at_cursor (buffer, message_buf,
61 message_buf_size + 1); 76 message_buf_size + 1);
62 77
@@ -157,13 +172,12 @@ remove_nick_save_call (void *arg)
157static int 172static int
158receive_callback (void *cls, 173receive_callback (void *cls,
159 struct GNUNET_CHAT_Room *room, 174 struct GNUNET_CHAT_Room *room,
160 const char *senderNick, 175 const GNUNET_HashCode *sender,
161 const char *message, 176 const char *message,
162 GNUNET_CronTime timestamp, GNUNET_CHAT_MSG_OPTIONS options) 177 GNUNET_CHAT_MSG_OPTIONS options)
163{ 178{
164 struct GNUNET_CHAT_gui_chat_client *client = cls; 179 struct GNUNET_CHAT_gui_chat_client *client = cls;
165 GtkWidget *chattextviewer; 180 GtkWidget *chattextviewer;
166
167 GList *children; 181 GList *children;
168 struct GNUNET_CHAT_safe_write_struct writearg; 182 struct GNUNET_CHAT_safe_write_struct writearg;
169 183
@@ -177,7 +191,7 @@ receive_callback (void *cls,
177 191
178 writearg.chatWindow = chattextviewer; 192 writearg.chatWindow = chattextviewer;
179 writearg.message = message; 193 writearg.message = message;
180 writearg.senderNick = senderNick; 194 writearg.sender = sender;
181 GNUNET_GTK_save_call (&write_save_call, &writearg); 195 GNUNET_GTK_save_call (&write_save_call, &writearg);
182 196
183 /*Write the message to the appropriate room... 197 /*Write the message to the appropriate room...
@@ -189,30 +203,31 @@ receive_callback (void *cls,
189} 203}
190 204
191static int 205static int
192member_list_callback (void *cls, const char *senderNick, 206member_list_callback (void *cls,
193 int is_joining, GNUNET_CronTime timestamp) 207 const struct GNUNET_ECRS_MetaData * member_info,
208 const GNUNET_RSA_PublicKey * pkey)
194{ 209{
195 struct GNUNET_CHAT_gui_chat_client *client = cls; 210 struct GNUNET_CHAT_gui_chat_client *client = cls;
196 GtkWidget *chatnicklist; 211 GtkWidget *chatnicklist;
212#if 0
197 struct GNUNET_CHAT_safe_nick_write_struct writearg; 213 struct GNUNET_CHAT_safe_nick_write_struct writearg;
198 214#endif
199 chatnicklist = 215 chatnicklist =
200 g_list_nth_data (gtk_container_get_children 216 g_list_nth_data (gtk_container_get_children
201 (GTK_CONTAINER (client->chatFrame)), 1); 217 (GTK_CONTAINER (client->chatFrame)), 1);
202 chatnicklist = 218 chatnicklist =
203 g_list_nth_data (gtk_container_get_children 219 g_list_nth_data (gtk_container_get_children
204 (GTK_CONTAINER (chatnicklist)), 0); 220 (GTK_CONTAINER (chatnicklist)), 0);
205 221#if 0
206 /* chatnicklist is the GtkTextView object */ 222 /* chatnicklist is the GtkTextView object */
207 writearg.nick = senderNick; 223 writearg.nick = member_info;
208 writearg.nickList = chatnicklist; 224 writearg.nickList = chatnicklist;
209 225
210 g_print ("received nick %s calling safe write call\n", writearg.nick);
211 if (is_joining) 226 if (is_joining)
212 GNUNET_GTK_save_call (&write_nick_save_call, &writearg); 227 GNUNET_GTK_save_call (&write_nick_save_call, &writearg);
213 else 228 else
214 GNUNET_GTK_save_call (&remove_nick_save_call, &writearg); 229 GNUNET_GTK_save_call (&remove_nick_save_call, &writearg);
215 230#endif
216 return GNUNET_OK; 231 return GNUNET_OK;
217} 232}
218 233
@@ -275,6 +290,7 @@ create_chat_room_tab (char *room_name, char *nick)
275 struct GNUNET_CHAT_Room *chatRoom; 290 struct GNUNET_CHAT_Room *chatRoom;
276 struct GNUNET_CHAT_gui_chat_client *client; 291 struct GNUNET_CHAT_gui_chat_client *client;
277 struct GNUNET_CHAT_gui_chat_client *pos; 292 struct GNUNET_CHAT_gui_chat_client *pos;
293 struct GNUNET_ECRS_MetaData * meta;
278 294
279 chatnotebook = 295 chatnotebook =
280 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "chatnotebook"); 296 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "chatnotebook");
@@ -295,12 +311,15 @@ create_chat_room_tab (char *room_name, char *nick)
295 strcpy (client->room_name, room_name); 311 strcpy (client->room_name, room_name);
296 312
297 /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */ 313 /* We do a silly strdup later on member_info... either check for NULL or only pass "" for member_info!! */
314 meta = GNUNET_ECRS_meta_data_create();
298 chatRoom = 315 chatRoom =
299 GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick, room_name, 316 GNUNET_CHAT_join_room (chat_ectx, chat_cfg, nick,
300 "", 317 meta,
318 room_name,
301 &receive_callback, client, &member_list_callback, 319 &receive_callback, client, &member_list_callback,
302 client); 320 client,
303 321 NULL, NULL);
322 GNUNET_ECRS_meta_data_destroy(meta);
304 client->room = chatRoom; 323 client->room = chatRoom;
305 client->chatFrame = newChatWindow; 324 client->chatFrame = newChatWindow;
306 client->number = 325 client->number =
@@ -337,7 +356,7 @@ on_chat_frame_send_button_click_event_chat (GtkWidget * widget, gpointer data)
337 GtkWidget *curr_page; 356 GtkWidget *curr_page;
338 GList *children; 357 GList *children;
339 GtkEntry *chat_entry; 358 GtkEntry *chat_entry;
340 359 unsigned int seq;
341 char *message; 360 char *message;
342 const gchar *room_name; 361 const gchar *room_name;
343 struct GNUNET_CHAT_gui_chat_client *client; 362 struct GNUNET_CHAT_gui_chat_client *client;
@@ -387,8 +406,8 @@ on_chat_frame_send_button_click_event_chat (GtkWidget * widget, gpointer data)
387 else 406 else
388 return; 407 return;
389 408
390 GNUNET_CHAT_send_message (client->room, message, NULL, 409 GNUNET_CHAT_send_message (client->room, message,
391 NULL, GNUNET_CHAT_MSG_OPTION_NONE, NULL); 410 GNUNET_CHAT_MSG_OPTION_NONE, NULL, &seq);
392 411
393 gtk_entry_set_text (chat_entry, ""); 412 gtk_entry_set_text (chat_entry, "");
394 413
diff --git a/src/plugins/chat/chat.h b/src/plugins/chat/chat.h
index c5b74ac5..b8c71f9c 100644
--- a/src/plugins/chat/chat.h
+++ b/src/plugins/chat/chat.h
@@ -52,19 +52,6 @@ struct GNUNET_CHAT_gui_chat_client
52 52
53}; 53};
54 54
55struct GNUNET_CHAT_safe_write_struct
56{
57 GtkWidget *chatWindow;
58 const char *message;
59 const char *senderNick;
60};
61
62struct GNUNET_CHAT_safe_nick_write_struct
63{
64 GtkWidget *nickList;
65 const char *nick;
66};
67
68struct GNUNET_CHAT_member_list 55struct GNUNET_CHAT_member_list
69{ 56{
70 struct GNUNET_CHAT_member_list *next; 57 struct GNUNET_CHAT_member_list *next;
diff --git a/src/plugins/fs/collection.c b/src/plugins/fs/collection.c
index bcb8dcd6..2f8ecf64 100644
--- a/src/plugins/fs/collection.c
+++ b/src/plugins/fs/collection.c
@@ -65,10 +65,8 @@ on_collectionMetaDataValueEntry_activate_fs (GtkWidget *
65void 65void
66createCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) 66createCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
67{ 67{
68 const char *collectionName;
69 const char *updateIntervalString; 68 const char *updateIntervalString;
70 GtkWidget *w; 69 GtkWidget *w;
71 GtkWidget *nameLine;
72 GtkWidget *dialog; 70 GtkWidget *dialog;
73 GtkWidget *spin; 71 GtkWidget *spin;
74 struct GNUNET_ECRS_MetaData *meta; 72 struct GNUNET_ECRS_MetaData *meta;
@@ -110,12 +108,9 @@ createCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
110 meta = getMetaDataFromList (metaXML, 108 meta = getMetaDataFromList (metaXML,
111 "collectionMetaDataTreeView", NULL); 109 "collectionMetaDataTreeView", NULL);
112 spin = glade_xml_get_widget (metaXML, "collectionAnonymityLevel"); 110 spin = glade_xml_get_widget (metaXML, "collectionAnonymityLevel");
113 nameLine = glade_xml_get_widget (metaXML, "collectionIdentifierEntry");
114 collectionName = gtk_entry_get_text (GTK_ENTRY (nameLine));
115 root = NULL; 111 root = NULL;
116 if (GNUNET_OK == GNUNET_CO_collection_start (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* priority */ 112 if (GNUNET_OK == GNUNET_CO_collection_start (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* priority */
117 updateInterval, 113 updateInterval, meta))
118 collectionName, meta))
119 { 114 {
120 w = 115 w =
121 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), 116 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
@@ -123,7 +118,7 @@ createCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
123 gtk_widget_set_sensitive (w, FALSE); 118 gtk_widget_set_sensitive (w, FALSE);
124 w = 119 w =
125 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), 120 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
126 "deleteCollection"); 121 "deleteCollection");
127 gtk_widget_set_sensitive (w, TRUE); 122 gtk_widget_set_sensitive (w, TRUE);
128 } 123 }
129 else 124 else
@@ -135,8 +130,7 @@ createCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
135 GTK_DIALOG_MODAL, 130 GTK_DIALOG_MODAL,
136 GTK_MESSAGE_ERROR, 131 GTK_MESSAGE_ERROR,
137 GTK_BUTTONS_CLOSE, 132 GTK_BUTTONS_CLOSE,
138 _("Failed to start collection `%s' (consult logs)."), 133 _("Failed to start collection (consult logs)."));
139 collectionName);
140 gtk_dialog_run (GTK_DIALOG (dialog)); 134 gtk_dialog_run (GTK_DIALOG (dialog));
141 gtk_widget_destroy (dialog); 135 gtk_widget_destroy (dialog);
142 } 136 }
@@ -176,15 +170,15 @@ void
176fs_collection_start () 170fs_collection_start ()
177{ 171{
178 GtkWidget *w; 172 GtkWidget *w;
179 char *h; 173 struct GNUNET_ECRS_MetaData *h;
180 174
181 h = GNUNET_CO_collection_get_name (); 175 h = GNUNET_CO_collection_get_name ();
182 if (NULL != h) 176 if (NULL != h)
183 { 177 {
184 w = 178 w =
185 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), 179 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
186 "createCollection"); 180 "createCollection");
187 GNUNET_free (h); 181 GNUNET_ECRS_meta_data_destroy (h);
188 } 182 }
189 else 183 else
190 w = 184 w =
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c
index 4a849582..0449e3b0 100644
--- a/src/plugins/fs/namespace.c
+++ b/src/plugins/fs/namespace.c
@@ -35,6 +35,7 @@
35#include <GNUnet/gnunet_util_crypto.h> 35#include <GNUnet/gnunet_util_crypto.h>
36#include <GNUnet/gnunet_uritrack_lib.h> 36#include <GNUnet/gnunet_uritrack_lib.h>
37#include <GNUnet/gnunet_namespace_lib.h> 37#include <GNUnet/gnunet_namespace_lib.h>
38#include <GNUnet/gnunet_pseudonym_lib.h>
38#include <extractor.h> 39#include <extractor.h>
39 40
40/** 41/**
@@ -402,7 +403,6 @@ addNamespaceContentToModel (void *cls,
402 */ 403 */
403int 404int
404addTabForNamespace (void *unused, 405addTabForNamespace (void *unused,
405 const char *namespaceName,
406 const GNUNET_HashCode * namespaceId, 406 const GNUNET_HashCode * namespaceId,
407 const struct GNUNET_ECRS_MetaData *md, int rating) 407 const struct GNUNET_ECRS_MetaData *md, int rating)
408{ 408{
@@ -410,12 +410,14 @@ addTabForNamespace (void *unused,
410 GtkWidget *label; 410 GtkWidget *label;
411 GtkWidget *notebook; 411 GtkWidget *notebook;
412 GtkWidget *del_menu; 412 GtkWidget *del_menu;
413 char * namespaceName;
413 414
414 if (GNUNET_OK != 415 if (GNUNET_OK !=
415 GNUNET_ECRS_namespace_test_exists (NULL, cfg, namespaceName, 416 GNUNET_ECRS_namespace_test_exists (NULL, cfg,
416 namespaceId)) 417 namespaceId))
417 return GNUNET_OK; 418 return GNUNET_OK;
418 GNUNET_GTK_DEBUG_BEGIN (); 419 GNUNET_GTK_DEBUG_BEGIN ();
420 namespaceName = GNUNET_PSEUDO_id_to_name(ectx, cfg, namespaceId);
419 label = gtk_label_new (namespaceName); 421 label = gtk_label_new (namespaceName);
420 list = GNUNET_malloc (sizeof (NamespaceList)); 422 list = GNUNET_malloc (sizeof (NamespaceList));
421 list->name = GNUNET_strdup (namespaceName); 423 list->name = GNUNET_strdup (namespaceName);
@@ -441,6 +443,7 @@ addTabForNamespace (void *unused,
441 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), 443 glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
442 "namespaceDelete"); 444 "namespaceDelete");
443 gtk_widget_set_sensitive (del_menu, TRUE); 445 gtk_widget_set_sensitive (del_menu, TRUE);
446 GNUNET_free(namespaceName);
444 return GNUNET_OK; 447 return GNUNET_OK;
445} 448}
446 449
@@ -990,9 +993,9 @@ fs_namespace_start ()
990 (GTK_TREE_VIEW (contentList), col - 1), 993 (GTK_TREE_VIEW (contentList), col - 1),
991 TRUE); 994 TRUE);
992 GNUNET_URITRACK_register_track_callback (ectx, cfg, &updateViewSave, NULL); 995 GNUNET_URITRACK_register_track_callback (ectx, cfg, &updateViewSave, NULL);
993 GNUNET_NS_namespace_list_all (ectx, cfg, &addTabForNamespace, NULL); 996 GNUNET_PSEUDO_list_all (ectx, cfg, &addTabForNamespace, NULL);
994 GNUNET_NS_register_discovery_callback (ectx, cfg, &namespace_discovered_cb, 997 GNUNET_PSEUDO_register_discovery_callback (ectx, cfg, &namespace_discovered_cb,
995 NULL); 998 NULL);
996 GNUNET_GTK_DEBUG_END (); 999 GNUNET_GTK_DEBUG_END ();
997} 1000}
998 1001
@@ -1000,7 +1003,7 @@ fs_namespace_start ()
1000void 1003void
1001fs_namespace_stop () 1004fs_namespace_stop ()
1002{ 1005{
1003 GNUNET_NS_unregister_discovery_callback (&namespace_discovered_cb, NULL); 1006 GNUNET_PSEUDO_unregister_discovery_callback (&namespace_discovered_cb, NULL);
1004 while (head != NULL) 1007 while (head != NULL)
1005 frame_destroy (head->treeview); 1008 frame_destroy (head->treeview);
1006 GNUNET_URITRACK_unregister_track_callback (&updateViewSave, NULL); 1009 GNUNET_URITRACK_unregister_track_callback (&updateViewSave, NULL);
diff --git a/src/plugins/fs/namespace.h b/src/plugins/fs/namespace.h
index 52c6cd02..880f82a8 100644
--- a/src/plugins/fs/namespace.h
+++ b/src/plugins/fs/namespace.h
@@ -31,7 +31,6 @@
31 * Add a tab for the given namespace. 31 * Add a tab for the given namespace.
32 */ 32 */
33int addTabForNamespace (void *unused, 33int addTabForNamespace (void *unused,
34 const char *namespaceName,
35 const GNUNET_HashCode * namespaceId, 34 const GNUNET_HashCode * namespaceId,
36 const struct GNUNET_ECRS_MetaData *md, int rating); 35 const struct GNUNET_ECRS_MetaData *md, int rating);
37 36
diff --git a/src/plugins/fs/namespace_create.c b/src/plugins/fs/namespace_create.c
index 3c3c95d7..d38aaab7 100644
--- a/src/plugins/fs/namespace_create.c
+++ b/src/plugins/fs/namespace_create.c
@@ -249,12 +249,12 @@ create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
249 namespaceName = gtk_entry_get_text (GTK_ENTRY (nameLine)); 249 namespaceName = gtk_entry_get_text (GTK_ENTRY (nameLine));
250 root = GNUNET_NS_namespace_create (ectx, cfg, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* FIXME: priority */ 250 root = GNUNET_NS_namespace_create (ectx, cfg, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* FIXME: priority */
251 GNUNET_get_time () + 2 * GNUNET_CRON_YEARS, /* FIXME: expiration */ 251 GNUNET_get_time () + 2 * GNUNET_CRON_YEARS, /* FIXME: expiration */
252 namespaceName, meta, keywordURI, 252 meta, keywordURI,
253 &rootEntry); 253 &rootEntry);
254 if (root != NULL) 254 if (root != NULL)
255 { 255 {
256 GNUNET_ECRS_uri_get_namespace_from_sks (root, &namespaceId); 256 GNUNET_ECRS_uri_get_namespace_from_sks (root, &namespaceId);
257 addTabForNamespace (NULL, namespaceName, &namespaceId, meta, 0); 257 addTabForNamespace (NULL, &namespaceId, meta, 0);
258 GNUNET_ECRS_uri_destroy (root); 258 GNUNET_ECRS_uri_destroy (root);
259 } 259 }
260 else 260 else
diff --git a/src/plugins/fs/namespace_search.c b/src/plugins/fs/namespace_search.c
index 19fa561a..baed05fe 100644
--- a/src/plugins/fs/namespace_search.c
+++ b/src/plugins/fs/namespace_search.c
@@ -32,6 +32,7 @@
32#include <GNUnet/gnunet_util_crypto.h> 32#include <GNUnet/gnunet_util_crypto.h>
33#include <GNUnet/gnunet_uritrack_lib.h> 33#include <GNUnet/gnunet_uritrack_lib.h>
34#include <GNUnet/gnunet_namespace_lib.h> 34#include <GNUnet/gnunet_namespace_lib.h>
35#include <GNUnet/gnunet_pseudonym_lib.h>
35#include <extractor.h> 36#include <extractor.h>
36 37
37 38
@@ -82,7 +83,7 @@ on_namespaceRatingSpinButton_changed_fs (GtkWidget * dummy,
82 GNUNET_enc_to_hash(encStr, 83 GNUNET_enc_to_hash(encStr,
83 &nsid); 84 &nsid);
84 newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); 85 newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin));
85 rating = GNUNET_NS_namespace_rank (ectx, 86 rating = GNUNET_PSEUDO_rank (ectx,
86 cfg, &nsid, 87 cfg, &nsid,
87 newrating - rating); 88 newrating - rating);
88 if (rating != newrating) 89 if (rating != newrating)
@@ -192,7 +193,7 @@ on_searchNamespaceComboBoxEntry_changed_fs (GtkWidget * dummy,
192 193
193struct NewNamespaceInfo 194struct NewNamespaceInfo
194{ 195{
195 const char *namespaceName; 196 char *namespaceName;
196 const GNUNET_HashCode *namespaceId; 197 const GNUNET_HashCode *namespaceId;
197 const struct GNUNET_ECRS_MetaData *md; 198 const struct GNUNET_ECRS_MetaData *md;
198 int rating; 199 int rating;
@@ -296,15 +297,16 @@ saveDiscovery (void *cls)
296 */ 297 */
297int 298int
298namespace_discovered_cb (void *cls, 299namespace_discovered_cb (void *cls,
299 const char *namespaceName,
300 const GNUNET_HashCode * namespaceId, 300 const GNUNET_HashCode * namespaceId,
301 const struct GNUNET_ECRS_MetaData *md, int rating) 301 const struct GNUNET_ECRS_MetaData *md, int rating)
302{ 302{
303 struct NewNamespaceInfo nni; 303 struct NewNamespaceInfo nni;
304 nni.namespaceName = namespaceName; 304
305 nni.namespaceName = GNUNET_PSEUDO_id_to_name(ectx, cfg, namespaceId);
305 nni.namespaceId = namespaceId; 306 nni.namespaceId = namespaceId;
306 nni.md = md; 307 nni.md = md;
307 nni.rating = rating; 308 nni.rating = rating;
308 GNUNET_GTK_save_call (&saveDiscovery, &nni); 309 GNUNET_GTK_save_call (&saveDiscovery, &nni);
310 GNUNET_free(nni.namespaceName);
309 return GNUNET_OK; 311 return GNUNET_OK;
310} 312}
diff --git a/src/plugins/fs/namespace_search.h b/src/plugins/fs/namespace_search.h
index 8a628297..2afbd1f3 100644
--- a/src/plugins/fs/namespace_search.h
+++ b/src/plugins/fs/namespace_search.h
@@ -37,7 +37,6 @@
37 * @return GNUNET_OK (always) 37 * @return GNUNET_OK (always)
38 */ 38 */
39int namespace_discovered_cb (void *cls, 39int namespace_discovered_cb (void *cls,
40 const char *namespaceName,
41 const GNUNET_HashCode * namespaceId, 40 const GNUNET_HashCode * namespaceId,
42 const struct GNUNET_ECRS_MetaData *md, 41 const struct GNUNET_ECRS_MetaData *md,
43 int rating); 42 int rating);