diff options
author | Omar Tarabai <tarabai@devegypt.com> | 2014-05-12 10:10:41 +0000 |
---|---|---|
committer | Omar Tarabai <tarabai@devegypt.com> | 2014-05-12 10:10:41 +0000 |
commit | d9cc0e96edf3637d292bf09671b216bf396faa36 (patch) | |
tree | bbbb0d642f73e817e5551f8c7f9de0a80343382c /src/peerstore/gnunet-peerstore.c | |
parent | 54b5026b7bf917816bef12620f94715ae1dd6f78 (diff) | |
download | gnunet-d9cc0e96edf3637d292bf09671b216bf396faa36.tar.gz gnunet-d9cc0e96edf3637d292bf09671b216bf396faa36.zip |
PEERSTORE api fix
Diffstat (limited to 'src/peerstore/gnunet-peerstore.c')
-rw-r--r-- | src/peerstore/gnunet-peerstore.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/peerstore/gnunet-peerstore.c b/src/peerstore/gnunet-peerstore.c index 750cc5636..9b26cf36c 100644 --- a/src/peerstore/gnunet-peerstore.c +++ b/src/peerstore/gnunet-peerstore.c | |||
@@ -58,7 +58,9 @@ shutdown_task (void *cls, | |||
58 | 58 | ||
59 | void test_cont(void *cls, const char *emsg) | 59 | void test_cont(void *cls, const char *emsg) |
60 | { | 60 | { |
61 | printf("Received a response\n"); | 61 | char *req = cls; |
62 | |||
63 | printf("Received a response to request: %s\n", req); | ||
62 | if(NULL != emsg) | 64 | if(NULL != emsg) |
63 | { | 65 | { |
64 | printf("Response: %s\n", emsg); | 66 | printf("Response: %s\n", emsg); |
@@ -97,7 +99,15 @@ run (void *cls, | |||
97 | 5, | 99 | 5, |
98 | GNUNET_TIME_UNIT_FOREVER_REL, | 100 | GNUNET_TIME_UNIT_FOREVER_REL, |
99 | &test_cont, | 101 | &test_cont, |
100 | NULL); | 102 | "Req1"); |
103 | GNUNET_PEERSTORE_store(peerstore_handle, | ||
104 | &pid, | ||
105 | "subsub", | ||
106 | "value", | ||
107 | 5, | ||
108 | GNUNET_TIME_UNIT_FOREVER_REL, | ||
109 | &test_cont, | ||
110 | "Req2"); | ||
101 | } | 111 | } |
102 | 112 | ||
103 | ret = 0; | 113 | ret = 0; |