gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit e390e7ae210aa77e506014dc39b9294c0477d3b1
parent dc803bb23182bb53c3a89634665592198f5e8d9c
Author: Bart Polot <bart.polot+voyager@gmail.com>
Date:   Wed,  8 Feb 2017 02:28:25 +0100

Merge branch 'master' of git+ssh://gnunet.org/gnunet

Diffstat:
MAUTHORS | 2+-
Msrc/cadet/gnunet-cadet.c | 4++--
Msrc/dns/gnunet-helper-dns.c | 2++
Msrc/psyc/gnunet-service-psyc.c | 3+++
Msrc/social/gnunet-social.c | 31++++++++++++++++++++++++-------
5 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -112,7 +112,7 @@ FreeBSD : Kirill Ponomarew <ponomarew@oberon.net> Debian GNU/Linux: Daniel Baumann <daniel.baumann@panthera-systems.net> OpenWrt/LEDE : Daniel Golle <daniel@makrotopia.org> OS X : Jussi Eloranta <eloranta@cc.jyu.fi> - +Gentoo : Carlo von lynX <psyc://loupsycedyglgamf.onion/~lynX> If you have contributed and are not listed here, please notify one of the maintainers in order to be added. diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c @@ -435,18 +435,18 @@ channel_incoming (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Not listening to channels\n"); return NULL; } -#if 0 // Closing the listen port currently breaks open connections. // Is this an intentional departure from POSIX socket behavior? // if (NULL != lp) { /* Now that we have our circuit up and running, let's not * get confused by further incoming connect requests. + * You need to start another 'gnunet-cadet -o' process + * to receive those. */ GNUNET_CADET_close_port (lp); lp = NULL; } -#endif ch = channel; if (GNUNET_NO == echo) { diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c @@ -794,6 +794,8 @@ main (int argc, char *const*argv) sbin_ip = "/sbin/ip"; else if (0 == access ("/usr/sbin/ip", X_OK)) sbin_ip = "/usr/sbin/ip"; + else if (0 == access ("/bin/ip", X_OK)) /* gentoo has it there */ + sbin_ip = "/bin/ip"; else { fprintf (stderr, diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c @@ -467,6 +467,9 @@ schedule_transmit_message (void *cls) static void shutdown_task (void *cls) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "shutting down...\n"); + GNUNET_PSYCSTORE_disconnect (store); if (NULL != stats) { GNUNET_STATISTICS_destroy (stats, GNUNET_YES); diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c @@ -154,6 +154,8 @@ struct GNUNET_SOCIAL_Host *hst; struct GNUNET_SOCIAL_Guest *gst; struct GNUNET_SOCIAL_Place *plc; +const char *method_received; + /* DISCONNECT */ @@ -308,7 +310,7 @@ static void guest_left (void *cls) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "The guest has left the place.\n"); + "Guest has left the place.\n"); } @@ -555,10 +557,15 @@ slicer_recv_method (void *cls, uint64_t message_id, const char *method_name) { + method_received = method_name; GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received method for message ID %" PRIu64 ":\n" "%s (flags: %x)\n", message_id, method_name, ntohl (meth->flags)); + /* routing header is missing, so we just print double newline */ + printf(".\n\n"); + /* we output . instead of | to indicate that this is not proper PSYC syntax */ + /* FIXME: use libpsyc here */ } @@ -576,10 +583,15 @@ slicer_recv_modifier (void *cls, uint16_t value_size, uint16_t full_value_size) { +#if 0 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received modifier for message ID %" PRIu64 ":\n" "%c%s: %.*s (size: %u)\n", message_id, oper, name, value_size, (const char *) value, value_size); +#endif + /* obviously not binary safe */ + printf("%c%s\t%.*s\n", + oper, name, value_size, (const char *) value); } @@ -594,10 +606,15 @@ slicer_recv_data (void *cls, const void *data, uint16_t data_size) { +#if 0 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received data for message ID %" PRIu64 ":\n" "%.*s\n", message_id, data_size, (const char *) data); +#endif + /* obviously not binary safe */ + printf("%s\n%.*s\n", + method_received, data_size, (const char *) data); } @@ -611,6 +628,7 @@ slicer_recv_eom (void *cls, uint64_t message_id, uint8_t is_cancelled) { + printf(".\n"); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received end of message ID %" PRIu64 ", cancelled: %u\n", @@ -685,7 +703,7 @@ guest_recv_local_enter (void *cls, int result, { char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Guest entered to local place: %s, max_message_id: %" PRIu64 "\n", + "Guest entered local place: %s, max_message_id: %" PRIu64 "\n", pub_str, max_message_id); GNUNET_free (pub_str); GNUNET_assert (0 <= result); @@ -1012,8 +1030,7 @@ app_recv_host (void *cls, enum GNUNET_SOCIAL_AppPlaceState place_state) { char *host_pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (host_pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Host: %s\n", host_pub_str); + printf ("Host\t%s\n", host_pub_str); GNUNET_free (host_pub_str); if ((op_host_reconnect || op_host_leave || op_host_announce || op_host_assign @@ -1039,8 +1056,7 @@ app_recv_guest (void *cls, enum GNUNET_SOCIAL_AppPlaceState place_state) { char *guest_pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (guest_pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Guest: %s\n", guest_pub_str); + printf ("Guest\t%s\n", guest_pub_str); GNUNET_free (guest_pub_str); if ((op_guest_reconnect || op_guest_leave || op_guest_talk @@ -1065,7 +1081,7 @@ app_recv_ego (void *cls, const char *name) { char *s = GNUNET_CRYPTO_ecdsa_public_key_to_string (pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Ego: %s\t%s\n", s, name); + printf ("Ego\t%s\t%s\n", s, name); GNUNET_free (s); if (0 == memcmp (&ego_pub_key, pub_key, sizeof (*pub_key)) @@ -1124,6 +1140,7 @@ run (void *cls, char *const *args, const char *cfgfile, || op_look_at || op_look_for)) { op_status = 1; + fputs("Caution: This tool does not produce correct binary safe PSYC syntax.\n\n", stderr); } GNUNET_SCHEDULER_add_shutdown (scheduler_shutdown, NULL);