diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-30 23:06:28 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-30 23:06:28 +0200 |
commit | 6aca750d325ff4058613d490d3e42e784d624dd3 (patch) | |
tree | 0453c0482b28b408d1fee944d6885d27b9621efb /src/gns | |
parent | 9bb74504227de02e04600af6ddfdf7ff8857515f (diff) | |
download | gnunet-6aca750d325ff4058613d490d3e42e784d624dd3.tar.gz gnunet-6aca750d325ff4058613d490d3e42e784d624dd3.zip |
REST/GNS: timeout handle 2nd try
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/plugin_rest_gns.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index 888688798..7f8d6fccf 100644 --- a/src/gns/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c | |||
@@ -209,6 +209,15 @@ do_error (void *cls) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | 211 | ||
212 | static void | ||
213 | do_timeout (void *cls) | ||
214 | { | ||
215 | struct RequestHandle *handle = cls; | ||
216 | handle->timeout_task = NULL; | ||
217 | do_error (handle); | ||
218 | } | ||
219 | |||
220 | |||
212 | /** | 221 | /** |
213 | * Iterator called on obtained result for a GNS lookup. | 222 | * Iterator called on obtained result for a GNS lookup. |
214 | * | 223 | * |
@@ -402,7 +411,7 @@ rest_process_request(struct GNUNET_REST_RequestHandle *rest_handle, | |||
402 | 411 | ||
403 | handle->timeout_task = | 412 | handle->timeout_task = |
404 | GNUNET_SCHEDULER_add_delayed (handle->timeout, | 413 | GNUNET_SCHEDULER_add_delayed (handle->timeout, |
405 | &do_error, | 414 | &do_timeout, |
406 | handle); | 415 | handle); |
407 | 416 | ||
408 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n"); | 417 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n"); |