aboutsummaryrefslogtreecommitdiff
path: root/src/regex/gnunet-daemon-regexprofiler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-06-20 08:32:50 +0000
committerChristian Grothoff <christian@grothoff.org>2013-06-20 08:32:50 +0000
commit21a2b4f95b4488645ba5a6254fcb8919c4915f73 (patch)
tree00c92cb7103cc14fba7e63e8dee99fe711856863 /src/regex/gnunet-daemon-regexprofiler.c
parent5533b105943b4f6dd688c1758350cd83ebeab3b9 (diff)
downloadgnunet-21a2b4f95b4488645ba5a6254fcb8919c4915f73.tar.gz
gnunet-21a2b4f95b4488645ba5a6254fcb8919c4915f73.zip
continuing refactoring of regex library structure, disambiguating symbol names between old regex library which is now internal and the public API; moving IP-to-regex conversion functions to tun library, as only vpn is using those to begin with
Diffstat (limited to 'src/regex/gnunet-daemon-regexprofiler.c')
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index 88621d882..6a61aa6f0 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -29,7 +29,7 @@
29 */ 29 */
30#include "platform.h" 30#include "platform.h"
31#include "gnunet_util_lib.h" 31#include "gnunet_util_lib.h"
32#include "gnunet_regex_lib.h" 32#include "regex_internal_lib.h"
33#include "regex_test_lib.h" 33#include "regex_test_lib.h"
34#include "gnunet_dht_service.h" 34#include "gnunet_dht_service.h"
35#include "gnunet_statistics_service.h" 35#include "gnunet_statistics_service.h"
@@ -57,7 +57,7 @@ static struct GNUNET_DHT_Handle *dht_handle;
57/** 57/**
58 * Peer's regex announce handle. 58 * Peer's regex announce handle.
59 */ 59 */
60static struct GNUNET_REGEX_announce_handle *announce_handle; 60static struct REGEX_ITERNAL_Announcement *announce_handle;
61 61
62/** 62/**
63 * Periodically reannounce regex. 63 * Periodically reannounce regex.
@@ -109,7 +109,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
109 109
110 if (NULL != announce_handle) 110 if (NULL != announce_handle)
111 { 111 {
112 GNUNET_REGEX_announce_cancel (announce_handle); 112 REGEX_ITERNAL_announce_cancel (announce_handle);
113 announce_handle = NULL; 113 announce_handle = NULL;
114 } 114 }
115 115
@@ -160,7 +160,7 @@ reannounce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
160 "First time, creating regex: %s\n", 160 "First time, creating regex: %s\n",
161 regex); 161 regex);
162 memset (&id, 0, sizeof (struct GNUNET_PeerIdentity)); 162 memset (&id, 0, sizeof (struct GNUNET_PeerIdentity));
163 announce_handle = GNUNET_REGEX_announce (dht_handle, 163 announce_handle = REGEX_ITERNAL_announce (dht_handle,
164 &id, 164 &id,
165 regex, 165 regex,
166 (unsigned int) max_path_compression, 166 (unsigned int) max_path_compression,
@@ -169,7 +169,7 @@ reannounce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
169 else 169 else
170 { 170 {
171 GNUNET_assert (NULL != announce_handle); 171 GNUNET_assert (NULL != announce_handle);
172 GNUNET_REGEX_reannounce (announce_handle); 172 REGEX_ITERNAL_reannounce (announce_handle);
173 } 173 }
174 174
175 random_delay = 175 random_delay =
@@ -330,7 +330,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
330 /* Read regexes from policy files */ 330 /* Read regexes from policy files */
331 GNUNET_assert (-1 != GNUNET_DISK_directory_scan (policy_dir, &scan, 331 GNUNET_assert (-1 != GNUNET_DISK_directory_scan (policy_dir, &scan,
332 (void *) (long) peer_id)); 332 (void *) (long) peer_id));
333 if (NULL == (components = GNUNET_REGEX_read_from_file (policy_filename))) 333 if (NULL == (components = REGEX_ITERNAL_read_from_file (policy_filename)))
334 { 334 {
335 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 335 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
336 "Policy file %s contains no policies. Exiting.\n", 336 "Policy file %s contains no policies. Exiting.\n",
@@ -339,8 +339,8 @@ run (void *cls, char *const *args GNUNET_UNUSED,
339 GNUNET_SCHEDULER_shutdown (); 339 GNUNET_SCHEDULER_shutdown ();
340 return; 340 return;
341 } 341 }
342 regex = GNUNET_REGEX_combine (components); 342 regex = REGEX_ITERNAL_combine (components);
343 GNUNET_REGEX_free_from_file (components); 343 REGEX_ITERNAL_free_from_file (components);
344 344
345 /* Announcing regexes from policy_filename */ 345 /* Announcing regexes from policy_filename */
346 GNUNET_asprintf (&rx_with_pfx, "%s(%s)(0|1)*", regex_prefix, regex); 346 GNUNET_asprintf (&rx_with_pfx, "%s(%s)(0|1)*", regex_prefix, regex);