diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-09 14:29:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-09 14:29:34 +0000 |
commit | 03374cc39814fa4bfb8d96e1165c688c44d8342f (patch) | |
tree | ed772250c49b39d82b9708ec8df0ee3e07e366d1 /src/namestore/test_namestore_api_lookup_nick.c | |
parent | 0c13a1e6fb0baffd83d413f313742a5f2b420297 (diff) | |
download | gnunet-03374cc39814fa4bfb8d96e1165c688c44d8342f.tar.gz gnunet-03374cc39814fa4bfb8d96e1165c688c44d8342f.zip |
make namestore API less brittle/sublte to use
Diffstat (limited to 'src/namestore/test_namestore_api_lookup_nick.c')
-rw-r--r-- | src/namestore/test_namestore_api_lookup_nick.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index d6d3945b7..de958cee2 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -222,6 +222,13 @@ lookup_it (void *cls, | |||
222 | 222 | ||
223 | 223 | ||
224 | static void | 224 | static void |
225 | fail_cb (void *cls) | ||
226 | { | ||
227 | GNUNET_assert (0); | ||
228 | } | ||
229 | |||
230 | |||
231 | static void | ||
225 | put_cont (void *cls, int32_t success, const char *emsg) | 232 | put_cont (void *cls, int32_t success, const char *emsg) |
226 | { | 233 | { |
227 | const char *name = cls; | 234 | const char *name = cls; |
@@ -240,9 +247,16 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
240 | return; | 247 | return; |
241 | } | 248 | } |
242 | /* Lookup */ | 249 | /* Lookup */ |
243 | nsqe = GNUNET_NAMESTORE_records_lookup (nsh, privkey, name, lookup_it, NULL); | 250 | nsqe = GNUNET_NAMESTORE_records_lookup (nsh, |
251 | privkey, | ||
252 | name, | ||
253 | &fail_cb, | ||
254 | NULL, | ||
255 | &lookup_it, | ||
256 | NULL); | ||
244 | } | 257 | } |
245 | 258 | ||
259 | |||
246 | static void | 260 | static void |
247 | nick_cont (void *cls, int32_t success, const char *emsg) | 261 | nick_cont (void *cls, int32_t success, const char *emsg) |
248 | { | 262 | { |