[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: no timeout for GNS request
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: no timeout for GNS request |
Date: |
Tue, 16 Jul 2019 17:54:56 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 6f0f8dc56 no timeout for GNS request
6f0f8dc56 is described below
commit 6f0f8dc56e60eef5e3b718705564db5ba7947fe5
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Tue Jul 16 17:53:45 2019 +0200
no timeout for GNS request
---
src/gns/plugin_rest_gns.c | 36 +-----------------------------------
1 file changed, 1 insertion(+), 35 deletions(-)
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c
index a0a582a50..46babdc76 100644
--- a/src/gns/plugin_rest_gns.c
+++ b/src/gns/plugin_rest_gns.c
@@ -101,16 +101,6 @@ struct RequestHandle
*/
struct GNUNET_REST_RequestHandle *rest_handle;
- /**
- * Desired timeout for the lookup (default is no timeout).
- */
- struct GNUNET_TIME_Relative timeout;
-
- /**
- * ID of a task associated with the resolution process.
- */
- struct GNUNET_SCHEDULER_Task *timeout_task;
-
/**
* The plugin result processor
*/
@@ -161,11 +151,6 @@ cleanup_handle (void *cls)
handle->gns = NULL;
}
- if (NULL != handle->timeout_task)
- {
- GNUNET_SCHEDULER_cancel (handle->timeout_task);
- handle->timeout_task = NULL;
- }
if (NULL != handle->url)
GNUNET_free (handle->url);
if (NULL != handle->name)
@@ -190,16 +175,13 @@ do_error (void *cls)
json_t *json_error = json_object();
char *response;
- if (NULL != handle->timeout_task)
- GNUNET_SCHEDULER_cancel (handle->timeout_task);
- handle->timeout_task = NULL;
if (NULL == handle->emsg)
handle->emsg = GNUNET_strdup(GNUNET_REST_GNS_ERROR_UNKNOWN);
json_object_set_new(json_error,"error", json_string(handle->emsg));
if (0 == handle->response_code)
- handle->response_code = MHD_HTTP_OK;
+ handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
response = json_dumps (json_error, 0);
resp = GNUNET_REST_create_response (response);
handle->proc (handle->proc_cls, resp, handle->response_code);
@@ -209,16 +191,6 @@ do_error (void *cls)
}
-static void
-do_timeout (void *cls)
-{
- struct RequestHandle *handle = cls;
- handle->timeout_task = NULL;
- handle->response_code = MHD_HTTP_REQUEST_TIMEOUT;
- do_error (handle);
-}
-
-
/**
* Iterator called on obtained result for a GNS lookup.
*
@@ -398,7 +370,6 @@ rest_process_request(struct GNUNET_REST_RequestHandle
*rest_handle,
struct RequestHandle *handle = GNUNET_new (struct RequestHandle);
handle->response_code = 0;
- handle->timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
60);
handle->proc_cls = proc_cls;
handle->proc = proc;
handle->rest_handle = rest_handle;
@@ -410,11 +381,6 @@ rest_process_request(struct GNUNET_REST_RequestHandle
*rest_handle,
handle->gns = GNUNET_GNS_connect (cfg);
init_cont(handle);
- handle->timeout_task =
- GNUNET_SCHEDULER_add_delayed (handle->timeout,
- &do_timeout,
- handle);
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: no timeout for GNS request,
gnunet <=