aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-dht-put.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-dht-put.c')
-rw-r--r--src/dht/gnunet-dht-put.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index b76b92c2b..4a752ea24 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -105,9 +105,8 @@ message_sent_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
105 * @param c configuration 105 * @param c configuration
106 */ 106 */
107static void 107static void
108run (void *cls, 108run (void *cls, char *const *args, const char *cfgfile,
109 char *const *args, 109 const struct GNUNET_CONFIGURATION_Handle *c)
110 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
111{ 110{
112 struct GNUNET_TIME_Relative timeout; 111 struct GNUNET_TIME_Relative timeout;
113 struct GNUNET_TIME_Absolute expiration; 112 struct GNUNET_TIME_Absolute expiration;
@@ -147,9 +146,9 @@ run (void *cls,
147 if (verbose) 146 if (verbose)
148 fprintf (stderr, _("Issuing put request for `%s' with data `%s'!\n"), 147 fprintf (stderr, _("Issuing put request for `%s' with data `%s'!\n"),
149 query_key, data); 148 query_key, data);
150 GNUNET_DHT_put (dht_handle, &key, DEFAULT_PUT_REPLICATION, 149 GNUNET_DHT_put (dht_handle, &key, DEFAULT_PUT_REPLICATION, GNUNET_DHT_RO_NONE,
151 GNUNET_DHT_RO_NONE, query_type, strlen (data), data, 150 query_type, strlen (data), data, expiration, timeout,
152 expiration, timeout, &message_sent_cont, NULL); 151 &message_sent_cont, NULL);
153 152
154} 153}
155 154
@@ -191,9 +190,7 @@ int
191main (int argc, char *const *argv) 190main (int argc, char *const *argv)
192{ 191{
193 return (GNUNET_OK == 192 return (GNUNET_OK ==
194 GNUNET_PROGRAM_run (argc, 193 GNUNET_PROGRAM_run (argc, argv, "gnunet-dht-put",
195 argv,
196 "gnunet-dht-put",
197 gettext_noop 194 gettext_noop
198 ("Issue a PUT request to the GNUnet DHT insert DATA under KEY."), 195 ("Issue a PUT request to the GNUnet DHT insert DATA under KEY."),
199 options, &run, NULL)) ? ret : 1; 196 options, &run, NULL)) ? ret : 1;