diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 19:12:17 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 19:12:17 +0200 |
commit | 8c48060e129877767f58a8403deba8a4beaeea24 (patch) | |
tree | 79cbe944d851c7c7536b63641eb36cb96a87b4b5 /src/reclaim/plugin_rest_reclaim.c | |
parent | b12644f83637c2508a11927490ae0b94d8ee4095 (diff) | |
download | gnunet-8c48060e129877767f58a8403deba8a4beaeea24.tar.gz gnunet-8c48060e129877767f58a8403deba8a4beaeea24.zip |
-fix rest plugin issues
Diffstat (limited to 'src/reclaim/plugin_rest_reclaim.c')
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index c2d14825e..0aeb0647a 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -1422,12 +1422,14 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle, | |||
1422 | handle->timeout = GNUNET_TIME_UNIT_FOREVER_REL; | 1422 | handle->timeout = GNUNET_TIME_UNIT_FOREVER_REL; |
1423 | handle->proc_cls = proc_cls; | 1423 | handle->proc_cls = proc_cls; |
1424 | handle->proc = proc; | 1424 | handle->proc = proc; |
1425 | state = ID_REST_STATE_INIT; | ||
1426 | handle->rest_handle = rest_handle; | 1425 | handle->rest_handle = rest_handle; |
1427 | 1426 | ||
1428 | handle->url = GNUNET_strdup (rest_handle->url); | 1427 | handle->url = GNUNET_strdup (rest_handle->url); |
1429 | if (handle->url[strlen (handle->url) - 1] == '/') | 1428 | if (handle->url[strlen (handle->url) - 1] == '/') |
1430 | handle->url[strlen (handle->url) - 1] = '\0'; | 1429 | handle->url[strlen (handle->url) - 1] = '\0'; |
1430 | handle->timeout_task = | ||
1431 | GNUNET_SCHEDULER_add_delayed (handle->timeout, &do_timeout, handle); | ||
1432 | |||
1431 | if (GNUNET_NO == | 1433 | if (GNUNET_NO == |
1432 | GNUNET_REST_handle_request (handle->rest_handle, handlers, &err, handle)) | 1434 | GNUNET_REST_handle_request (handle->rest_handle, handlers, &err, handle)) |
1433 | { | 1435 | { |
@@ -1435,8 +1437,6 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle, | |||
1435 | return GNUNET_NO; | 1437 | return GNUNET_NO; |
1436 | } | 1438 | } |
1437 | 1439 | ||
1438 | handle->timeout_task = | ||
1439 | GNUNET_SCHEDULER_add_delayed (handle->timeout, &do_timeout, handle); | ||
1440 | return GNUNET_YES; | 1440 | return GNUNET_YES; |
1441 | } | 1441 | } |
1442 | 1442 | ||
@@ -1470,6 +1470,7 @@ libgnunet_plugin_rest_reclaim_init (void *cls) | |||
1470 | MHD_HTTP_METHOD_DELETE, | 1470 | MHD_HTTP_METHOD_DELETE, |
1471 | MHD_HTTP_METHOD_OPTIONS); | 1471 | MHD_HTTP_METHOD_OPTIONS); |
1472 | identity_handle = GNUNET_IDENTITY_connect (cfg, &list_ego, NULL); | 1472 | identity_handle = GNUNET_IDENTITY_connect (cfg, &list_ego, NULL); |
1473 | state = ID_REST_STATE_INIT; | ||
1473 | idp = GNUNET_RECLAIM_connect (cfg); | 1474 | idp = GNUNET_RECLAIM_connect (cfg); |
1474 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1475 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1475 | _ ("Identity Provider REST API initialized\n")); | 1476 | _ ("Identity Provider REST API initialized\n")); |