diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
commit | 5746309cb4be2073d550ad7a6885e918631dbc38 (patch) | |
tree | 89455bc4aadf977816b38df13f990372cd81d71a /src/template | |
parent | 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff) | |
download | gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip |
indentation
Diffstat (limited to 'src/template')
-rw-r--r-- | src/template/gnunet-service-template.c | 11 | ||||
-rw-r--r-- | src/template/gnunet-template.c | 13 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/template/gnunet-service-template.c b/src/template/gnunet-service-template.c index 8ee88c961..54b7ecc94 100644 --- a/src/template/gnunet-service-template.c +++ b/src/template/gnunet-service-template.c | |||
@@ -49,8 +49,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
49 | * @param cfg configuration to use | 49 | * @param cfg configuration to use |
50 | */ | 50 | */ |
51 | static void | 51 | static void |
52 | run (void *cls, | 52 | run (void *cls, struct GNUNET_SERVER_Handle *server, |
53 | struct GNUNET_SERVER_Handle *server, | ||
54 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 53 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
55 | { | 54 | { |
56 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { | 55 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { |
@@ -59,8 +58,8 @@ run (void *cls, | |||
59 | }; | 58 | }; |
60 | /* FIXME: do setup here */ | 59 | /* FIXME: do setup here */ |
61 | GNUNET_SERVER_add_handlers (server, handlers); | 60 | GNUNET_SERVER_add_handlers (server, handlers); |
62 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 61 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task, |
63 | &cleanup_task, NULL); | 62 | NULL); |
64 | } | 63 | } |
65 | 64 | ||
66 | 65 | ||
@@ -75,9 +74,7 @@ int | |||
75 | main (int argc, char *const *argv) | 74 | main (int argc, char *const *argv) |
76 | { | 75 | { |
77 | return (GNUNET_OK == | 76 | return (GNUNET_OK == |
78 | GNUNET_SERVICE_run (argc, | 77 | GNUNET_SERVICE_run (argc, argv, "template", |
79 | argv, | ||
80 | "template", | ||
81 | GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1; | 78 | GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1; |
82 | } | 79 | } |
83 | 80 | ||
diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c index 657b3d4ce..7b1d9dfff 100644 --- a/src/template/gnunet-template.c +++ b/src/template/gnunet-template.c | |||
@@ -42,9 +42,8 @@ static int ret; | |||
42 | * @param cfg configuration | 42 | * @param cfg configuration |
43 | */ | 43 | */ |
44 | static void | 44 | static void |
45 | run (void *cls, | 45 | run (void *cls, char *const *args, const char *cfgfile, |
46 | char *const *args, | 46 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
47 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
48 | { | 47 | { |
49 | /* main code here */ | 48 | /* main code here */ |
50 | } | 49 | } |
@@ -65,11 +64,9 @@ main (int argc, char *const *argv) | |||
65 | GNUNET_GETOPT_OPTION_END | 64 | GNUNET_GETOPT_OPTION_END |
66 | }; | 65 | }; |
67 | return (GNUNET_OK == | 66 | return (GNUNET_OK == |
68 | GNUNET_PROGRAM_run (argc, | 67 | GNUNET_PROGRAM_run (argc, argv, "gnunet-template", |
69 | argv, | 68 | gettext_noop ("help text"), options, &run, |
70 | "gnunet-template", | 69 | NULL)) ? ret : 1; |
71 | gettext_noop ("help text"), | ||
72 | options, &run, NULL)) ? ret : 1; | ||
73 | } | 70 | } |
74 | 71 | ||
75 | /* end of gnunet-template.c */ | 72 | /* end of gnunet-template.c */ |