diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-12 08:37:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-12 08:37:58 +0000 |
commit | 301fe2c60beb21c920dd395bd2ca3359ab237952 (patch) | |
tree | 7786b332c652942256e94e7f027de6492a388e9f | |
parent | c6417681545b2b97b5a427843bd73446c333f3e2 (diff) | |
download | gnunet-gtk-301fe2c60beb21c920dd395bd2ca3359ab237952.tar.gz gnunet-gtk-301fe2c60beb21c920dd395bd2ca3359ab237952.zip |
fix compilation (hack for now)
-rw-r--r-- | src/peerinfo/gnunet-peerinfo-gtk.c | 47 | ||||
-rw-r--r-- | src/setup/gnunet-setup-options.c | 2 |
2 files changed, 16 insertions, 33 deletions
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c b/src/peerinfo/gnunet-peerinfo-gtk.c index 7f1d3442..39d4adba 100644 --- a/src/peerinfo/gnunet-peerinfo-gtk.c +++ b/src/peerinfo/gnunet-peerinfo-gtk.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "gnunet_gtk.h" | 26 | #include "gnunet_gtk.h" |
27 | #include <gnunet/gnunet_peerinfo_service.h> | 27 | #include <gnunet/gnunet_peerinfo_service.h> |
28 | #include <gnunet/gnunet_transport_service.h> | 28 | #include <gnunet/gnunet_transport_service.h> |
29 | #include <gnunet/gnunet_core_service.h> | 29 | #include <gnunet/gnunet_ats_service.h> |
30 | #include "gnunet-peerinfo-gtk-flags.h" | 30 | #include "gnunet-peerinfo-gtk-flags.h" |
31 | 31 | ||
32 | 32 | ||
@@ -69,9 +69,9 @@ static struct GNUNET_GTK_MainLoop *ml; | |||
69 | static struct GNUNET_PEERINFO_NotifyContext *pnc; | 69 | static struct GNUNET_PEERINFO_NotifyContext *pnc; |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Handle to core service. | 72 | * Handle to ATS service. |
73 | */ | 73 | */ |
74 | static struct GNUNET_CORE_Handle *core; | 74 | // static struct GNUNET_ATS_Handle *ats; |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * Map of peer identities to the respective PeerInfo for our view. | 77 | * Map of peer identities to the respective PeerInfo for our view. |
@@ -145,11 +145,13 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
145 | { | 145 | { |
146 | GNUNET_PEERINFO_notify_cancel (pnc); | 146 | GNUNET_PEERINFO_notify_cancel (pnc); |
147 | pnc = NULL; | 147 | pnc = NULL; |
148 | if (NULL != core) | 148 | #if FIXME |
149 | if (NULL != ats) | ||
149 | { | 150 | { |
150 | GNUNET_CORE_disconnect (core); | 151 | GNUNET_ATS_disconnect (ats); |
151 | core = NULL; | 152 | ats = NULL; |
152 | } | 153 | } |
154 | #endif | ||
153 | GNUNET_CONTAINER_multihashmap_iterate (peer2info, &free_paths, NULL); | 155 | GNUNET_CONTAINER_multihashmap_iterate (peer2info, &free_paths, NULL); |
154 | GNUNET_CONTAINER_multihashmap_destroy (peer2info); | 156 | GNUNET_CONTAINER_multihashmap_destroy (peer2info); |
155 | peer2info = NULL; | 157 | peer2info = NULL; |
@@ -275,28 +277,7 @@ peerinfo_processor (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
275 | } | 277 | } |
276 | 278 | ||
277 | 279 | ||
278 | /** | 280 | #if FIXME |
279 | * Function called after GNUNET_CORE_connect has succeeded | ||
280 | * (or failed for good). Note that the private key of the | ||
281 | * peer is intentionally not exposed here; if you need it, | ||
282 | * your process should try to read the private key file | ||
283 | * directly (which should work if you are authorized...). | ||
284 | * | ||
285 | * @param cls closure | ||
286 | * @param server handle to the server, NULL if we failed | ||
287 | * @param my_identity ID of this peer, NULL if we failed | ||
288 | * @param publicKey public key of this peer, NULL if we failed | ||
289 | */ | ||
290 | static void | ||
291 | init_cb (void *cls, struct GNUNET_CORE_Handle *server, | ||
292 | const struct GNUNET_PeerIdentity *my_identity, | ||
293 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) | ||
294 | { | ||
295 | /* FIXME: should probably do something to my 'own' entry | ||
296 | * in the peerinfo list to make it stand out */ | ||
297 | } | ||
298 | |||
299 | |||
300 | /** | 281 | /** |
301 | * Method called whenever a given peer has a status change. | 282 | * Method called whenever a given peer has a status change. |
302 | * | 283 | * |
@@ -333,6 +314,7 @@ status_cb (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
333 | gtk_list_store_set (ls, &iter, 4, (guint64) ntohl (bandwidth_in.value__), 5, | 314 | gtk_list_store_set (ls, &iter, 4, (guint64) ntohl (bandwidth_in.value__), 5, |
334 | (guint64) ntohl (bandwidth_out.value__), -1); | 315 | (guint64) ntohl (bandwidth_out.value__), -1); |
335 | } | 316 | } |
317 | #endif | ||
336 | 318 | ||
337 | 319 | ||
338 | /** | 320 | /** |
@@ -369,10 +351,11 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
369 | _("Failed to initialize communication with peerinfo service!\n")); | 351 | _("Failed to initialize communication with peerinfo service!\n")); |
370 | exit (1); | 352 | exit (1); |
371 | } | 353 | } |
372 | core = | 354 | #if FIXME |
373 | GNUNET_CORE_connect (get_configuration (), 1, NULL, &init_cb, NULL, NULL, | 355 | ats = |
374 | &status_cb, NULL, GNUNET_NO, NULL, GNUNET_NO, NULL); | 356 | GNUNET_ATS_connect (get_configuration (), |
375 | 357 | &status_cb, NULL); | |
358 | #endif | ||
376 | /* setup main window */ | 359 | /* setup main window */ |
377 | main_window = GTK_WIDGET (get_object ("GNUNET_PEERINFO_GTK_main_window")); | 360 | main_window = GTK_WIDGET (get_object ("GNUNET_PEERINFO_GTK_main_window")); |
378 | gtk_window_maximize (GTK_WINDOW (main_window)); | 361 | gtk_window_maximize (GTK_WINDOW (main_window)); |
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c index 7af3288a..ab969c5c 100644 --- a/src/setup/gnunet-setup-options.c +++ b/src/setup/gnunet-setup-options.c | |||
@@ -545,7 +545,7 @@ add_dns_entry_to_list_store (void *cls, const char *section) | |||
545 | { | 545 | { |
546 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, "", 1, | 546 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, "", 1, |
547 | (guint) 80, 2, (guint) 8080, 3, | 547 | (guint) 80, 2, (guint) 8080, 3, |
548 | "localhost", 4, "tcp", -1); | 548 | "localhost4", 4, "tcp", -1); |
549 | return; | 549 | return; |
550 | } | 550 | } |
551 | 551 | ||