From 70917f2b18188f42582157d47ebffc7727117c41 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 25 Jan 2013 11:54:56 +0000 Subject: [PATCH] - pass local ID to announce --- src/regex/gnunet-daemon-regexprofiler.c | 4 ++-- src/regex/gnunet-regex-profiler.c | 18 +++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c index 610ed4ef1..0175f80ee 100644 --- a/src/regex/gnunet-daemon-regexprofiler.c +++ b/src/regex/gnunet-daemon-regexprofiler.c @@ -168,7 +168,7 @@ announce_regex (const char * regex) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Announcing regex: %s\n", regex); GNUNET_STATISTICS_update (stats_handle, "# regexes announced", 1, GNUNET_NO); announce_handle = GNUNET_REGEX_announce (dht_handle, - NULL, + &my_full_id, regex, (unsigned int) max_path_compression, stats_handle); @@ -411,7 +411,7 @@ main (int argc, char *const *argv) if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) return 2; - sleep (60); + sleep (30); return (GNUNET_OK == GNUNET_PROGRAM_run (argc, argv, "regexprofiler", gettext_noop diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index 86183a5fc..292c845b0 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c @@ -401,7 +401,7 @@ regex_found_handler (void *cls, /** - * Mesh connect callback. + * DHT connect callback. * * @param cls internal peer id. * @param op operation handle. @@ -410,7 +410,7 @@ regex_found_handler (void *cls, */ static void dht_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, - void *ca_result, const char *emsg); + void *ca_result, const char *emsg); /** * DHT connect adapter. @@ -509,16 +509,12 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_snprintf (output_buffer, sizeof (output_buffer), "%p Search string not found: %s (%d)\n%p On peer: %u (%p)\n%p With policy file: %s\n%p After: %s\n", - peer, - peer->search_str, - peer->search_str_matched, - peer, - peer->id, + peer, peer->search_str, peer->search_str_matched, + peer, peer->id, peer, + peer, peer->policy_file, peer, - peer, - peer->policy_file, - peer, - GNUNET_STRINGS_relative_time_to_string (prof_time, GNUNET_NO)); + GNUNET_STRINGS_relative_time_to_string (prof_time, + GNUNET_NO)); if (size != GNUNET_DISK_file_write (data_file, output_buffer, size)) GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unable to write to file!\n"); } -- 2.25.1