aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-dht-put.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-10-02 13:58:05 +0000
committerChristian Grothoff <christian@grothoff.org>2010-10-02 13:58:05 +0000
commit7b80cc15aaf3f61fb05635577fdd5258d5b8bb17 (patch)
tree4eaf19b132776841b8ab4ec2a8a81887c242b836 /src/dht/gnunet-dht-put.c
parent3953eff33493400e9ef8ba4f9df18cc27bacadc1 (diff)
downloadgnunet-7b80cc15aaf3f61fb05635577fdd5258d5b8bb17.tar.gz
gnunet-7b80cc15aaf3f61fb05635577fdd5258d5b8bb17.zip
new DHT API, tests do not yet compile
Diffstat (limited to 'src/dht/gnunet-dht-put.c')
-rw-r--r--src/dht/gnunet-dht-put.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index 9d3b2707b..9f7091b84 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -79,11 +79,11 @@ static char *data;
79static void 79static void
80shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 80shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
81{ 81{
82
83 if (dht_handle != NULL) 82 if (dht_handle != NULL)
84 GNUNET_DHT_disconnect (dht_handle); 83 {
85 84 GNUNET_DHT_disconnect (dht_handle);
86 dht_handle = NULL; 85 dht_handle = NULL;
86 }
87} 87}
88 88
89/** 89/**
@@ -165,8 +165,14 @@ run (void *cls,
165 fprintf (stderr, "Issuing put request for `%s' with data `%s'!\n", 165 fprintf (stderr, "Issuing put request for `%s' with data `%s'!\n",
166 query_key, data); 166 query_key, data);
167 167
168 GNUNET_DHT_put (dht_handle, &key, query_type, strlen (data), data, 168 GNUNET_DHT_put (dht_handle,
169 expiration, timeout, &message_sent_cont, NULL); 169 &key,
170 GNUNET_DHT_RO_NONE,
171 query_type,
172 strlen (data), data,
173 expiration,
174 timeout,
175 &message_sent_cont, NULL);
170 176
171} 177}
172 178
@@ -215,3 +221,5 @@ main (int argc, char *const *argv)
215 ("Issue a PUT request to the GNUnet DHT insert DATA under KEY."), 221 ("Issue a PUT request to the GNUnet DHT insert DATA under KEY."),
216 options, &run, NULL)) ? ret : 1; 222 options, &run, NULL)) ? ret : 1;
217} 223}
224
225/* end of gnunet-dht-put.c */