aboutsummaryrefslogtreecommitdiff
path: root/src/template/gnunet-template.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-10-21 22:00:26 +0000
committerChristian Grothoff <christian@grothoff.org>2016-10-21 22:00:26 +0000
commita7e626e2a613e86f3ebf6ff6f8cfec1cc2a9758b (patch)
treebf5da6bc86d387ffbc885f20974385d581679993 /src/template/gnunet-template.c
parent51baa79fb2c3f05b79d012db22b8d47cdcacf976 (diff)
downloadgnunet-a7e626e2a613e86f3ebf6ff6f8cfec1cc2a9758b.tar.gz
gnunet-a7e626e2a613e86f3ebf6ff6f8cfec1cc2a9758b.zip
migrate template to new service API
Diffstat (limited to 'src/template/gnunet-template.c')
-rw-r--r--src/template/gnunet-template.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c
index 987923587..22b78d632 100644
--- a/src/template/gnunet-template.c
+++ b/src/template/gnunet-template.c
@@ -32,6 +32,7 @@
32 */ 32 */
33static int ret; 33static int ret;
34 34
35
35/** 36/**
36 * Main function that will be run by the scheduler. 37 * Main function that will be run by the scheduler.
37 * 38 *
@@ -41,7 +42,9 @@ static int ret;
41 * @param cfg configuration 42 * @param cfg configuration
42 */ 43 */
43static void 44static void
44run (void *cls, char *const *args, const char *cfgfile, 45run (void *cls,
46 char *const *args,
47 const char *cfgfile,
45 const struct GNUNET_CONFIGURATION_Handle *cfg) 48 const struct GNUNET_CONFIGURATION_Handle *cfg)
46{ 49{
47 /* main code here */ 50 /* main code here */
@@ -62,12 +65,17 @@ main (int argc, char *const *argv)
62 /* FIMXE: add options here */ 65 /* FIMXE: add options here */
63 GNUNET_GETOPT_OPTION_END 66 GNUNET_GETOPT_OPTION_END
64 }; 67 };
65 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 68 if (GNUNET_OK !=
69 GNUNET_STRINGS_get_utf8_args (argc, argv,
70 &argc, &argv))
66 return 2; 71 return 2;
67 72
68 ret = (GNUNET_OK == 73 ret = (GNUNET_OK ==
69 GNUNET_PROGRAM_run (argc, argv, "gnunet-template", 74 GNUNET_PROGRAM_run (argc, argv,
70 gettext_noop ("help text"), options, &run, 75 "gnunet-template",
76 gettext_noop ("help text"),
77 options,
78 &run,
71 NULL)) ? ret : 1; 79 NULL)) ? ret : 1;
72 GNUNET_free ((void*) argv); 80 GNUNET_free ((void*) argv);
73 return ret; 81 return ret;