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/fs/gnunet-pseudonym.c | |
parent | 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff) | |
download | gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip |
indentation
Diffstat (limited to 'src/fs/gnunet-pseudonym.c')
-rw-r--r-- | src/fs/gnunet-pseudonym.c | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c index 742111c4e..ce0d24506 100644 --- a/src/fs/gnunet-pseudonym.c +++ b/src/fs/gnunet-pseudonym.c | |||
@@ -105,9 +105,7 @@ ns_printer (void *cls, const char *name, const GNUNET_HashCode * id) | |||
105 | 105 | ||
106 | 106 | ||
107 | static int | 107 | static int |
108 | pseudo_printer (void *cls, | 108 | pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym, |
109 | const GNUNET_HashCode * | ||
110 | pseudonym, | ||
111 | const struct GNUNET_CONTAINER_MetaData *md, int rating) | 109 | const struct GNUNET_CONTAINER_MetaData *md, int rating) |
112 | { | 110 | { |
113 | char *id; | 111 | char *id; |
@@ -150,8 +148,8 @@ post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
150 | set++; | 148 | set++; |
151 | if (*set != ':') | 149 | if (*set != ':') |
152 | { | 150 | { |
153 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 151 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Invalid argument `%s'\n"), |
154 | _("Invalid argument `%s'\n"), rating_change); | 152 | rating_change); |
155 | } | 153 | } |
156 | else | 154 | else |
157 | { | 155 | { |
@@ -164,8 +162,8 @@ post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
164 | } | 162 | } |
165 | else | 163 | else |
166 | { | 164 | { |
167 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 165 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Namespace `%s' unknown.\n"), |
168 | _("Namespace `%s' unknown.\n"), rating_change); | 166 | rating_change); |
169 | } | 167 | } |
170 | } | 168 | } |
171 | GNUNET_free (rating_change); | 169 | GNUNET_free (rating_change); |
@@ -192,17 +190,14 @@ post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
192 | * @param c configuration | 190 | * @param c configuration |
193 | */ | 191 | */ |
194 | static void | 192 | static void |
195 | run (void *cls, | 193 | run (void *cls, char *const *args, const char *cfgfile, |
196 | char *const *args, | 194 | const struct GNUNET_CONFIGURATION_Handle *c) |
197 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) | ||
198 | { | 195 | { |
199 | char *emsg; | 196 | char *emsg; |
200 | 197 | ||
201 | cfg = c; | 198 | cfg = c; |
202 | h = GNUNET_FS_start (cfg, | 199 | h = GNUNET_FS_start (cfg, "gnunet-pseudonym", &progress_cb, NULL, |
203 | "gnunet-pseudonym", | 200 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
204 | &progress_cb, | ||
205 | NULL, GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | ||
206 | if (NULL != delete_ns) | 201 | if (NULL != delete_ns) |
207 | { | 202 | { |
208 | ns = GNUNET_FS_namespace_create (h, delete_ns); | 203 | ns = GNUNET_FS_namespace_create (h, delete_ns); |
@@ -234,13 +229,9 @@ run (void *cls, | |||
234 | ksk_uri = GNUNET_FS_uri_parse ("gnunet://fs/ksk/namespace", &emsg); | 229 | ksk_uri = GNUNET_FS_uri_parse ("gnunet://fs/ksk/namespace", &emsg); |
235 | GNUNET_assert (NULL == emsg); | 230 | GNUNET_assert (NULL == emsg); |
236 | } | 231 | } |
237 | GNUNET_FS_namespace_advertise (h, | 232 | GNUNET_FS_namespace_advertise (h, ksk_uri, ns, adv_metadata, &bo, |
238 | ksk_uri, | 233 | root_identifier, &post_advertising, |
239 | ns, | 234 | NULL); |
240 | adv_metadata, | ||
241 | &bo, | ||
242 | root_identifier, | ||
243 | &post_advertising, NULL); | ||
244 | return; | 235 | return; |
245 | } | 236 | } |
246 | else | 237 | else |
@@ -284,9 +275,8 @@ main (int argc, char *const *argv) | |||
284 | gettext_noop ("delete namespace NAME "), | 275 | gettext_noop ("delete namespace NAME "), |
285 | 1, &GNUNET_GETOPT_set_string, &delete_ns}, | 276 | 1, &GNUNET_GETOPT_set_string, &delete_ns}, |
286 | {'k', "keyword", "VALUE", | 277 | {'k', "keyword", "VALUE", |
287 | gettext_noop | 278 | gettext_noop ("add an additional keyword for the advertisment" |
288 | ("add an additional keyword for the advertisment" | 279 | " (this option can be specified multiple times)"), |
289 | " (this option can be specified multiple times)"), | ||
290 | 1, &GNUNET_FS_getopt_set_keywords, &ksk_uri}, | 280 | 1, &GNUNET_FS_getopt_set_keywords, &ksk_uri}, |
291 | {'m', "meta", "TYPE:VALUE", | 281 | {'m', "meta", "TYPE:VALUE", |
292 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), | 282 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), |