aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaximilian Szengel <gnunet@maxsz.de>2012-11-07 17:23:12 +0000
committerMaximilian Szengel <gnunet@maxsz.de>2012-11-07 17:23:12 +0000
commit55024d902a89b81b0851c3c95df452c9e20eeced (patch)
tree9e2838a585a6adf2b249f92a604675f4e294f056 /src
parentfc8e308ea06aff671dc1d21e99e8b42bf5c2fda1 (diff)
downloadgnunet-55024d902a89b81b0851c3c95df452c9e20eeced.tar.gz
gnunet-55024d902a89b81b0851c3c95df452c9e20eeced.zip
- regexprofiler service to daemon
- enabling nse in regex profiler
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-regexprofiler.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-regexprofiler.c b/src/mesh/gnunet-service-regexprofiler.c
index f794e236d..c1a034405 100644
--- a/src/mesh/gnunet-service-regexprofiler.c
+++ b/src/mesh/gnunet-service-regexprofiler.c
@@ -121,15 +121,16 @@ announce_regex (const char * regex)
121 121
122 122
123/** 123/**
124 * Main function that will be run by the scheduler. 124 * @brief Main function that will be run by the scheduler.
125 * 125 *
126 * @param cls closure 126 * @param cls closure
127 * @param server the initialized server 127 * @param args remaining command-line arguments
128 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
128 * @param cfg_ configuration 129 * @param cfg_ configuration
129 */ 130 */
130static void 131static void
131run (void *cls, 132run (void *cls, char *const *args GNUNET_UNUSED,
132 struct GNUNET_SERVER_Handle *server, 133 const char *cfgfile GNUNET_UNUSED,
133 const struct GNUNET_CONFIGURATION_Handle *cfg_) 134 const struct GNUNET_CONFIGURATION_Handle *cfg_)
134{ 135{
135 char *regex; 136 char *regex;
@@ -257,10 +258,18 @@ run (void *cls,
257int 258int
258main (int argc, char *const *argv) 259main (int argc, char *const *argv)
259{ 260{
261 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
262 GNUNET_GETOPT_OPTION_END
263 };
264
265 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
266 return 2;
267
260 return (GNUNET_OK == 268 return (GNUNET_OK ==
261 GNUNET_SERVICE_run (argc, argv, "regexprofiler", 269 GNUNET_PROGRAM_run (argc, argv, "regexprofiler",
262 GNUNET_SERVICE_OPTION_NONE, 270 gettext_noop
263 &run, NULL)) ? global_ret : 1; 271 ("Daemon to announce regular expressions for the peer using mesh."),
272 options, &run, NULL)) ? global_ret : 1;
264} 273}
265 274
266 275