diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-29 23:21:33 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-29 23:21:33 +0100 |
commit | 778c2228f8662d748b65e48104be357c162d51ca (patch) | |
tree | 8b8b80ffcb0f01b0252258018788dff2637209ee /src/sync/sync-httpd.c | |
parent | aa05313f77da9091e01dcb154c9da033840982dd (diff) | |
download | sync-778c2228f8662d748b65e48104be357c162d51ca.tar.gz sync-778c2228f8662d748b65e48104be357c162d51ca.tar.bz2 sync-778c2228f8662d748b65e48104be357c162d51ca.zip |
fix issues
Diffstat (limited to 'src/sync/sync-httpd.c')
-rw-r--r-- | src/sync/sync-httpd.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/sync/sync-httpd.c b/src/sync/sync-httpd.c index 975db92..8700a50 100644 --- a/src/sync/sync-httpd.c +++ b/src/sync/sync-httpd.c @@ -196,7 +196,7 @@ url_handler (void *cls, /* We only read the correlation ID on the first callback for every client */ correlation_id = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, - "sync-Correlation-Id"); + "Sync-Correlation-Id"); if ((NULL != correlation_id) && (GNUNET_YES != is_valid_correlation_id (correlation_id))) { @@ -249,11 +249,21 @@ url_handler (void *cls, if (0 == strcasecmp (method, MHD_HTTP_METHOD_POST)) { - return sync_handler_backup_post (connection, - con_cls, - &account_pub, - upload_data, - upload_data_size); + int ret; + + ret = sync_handler_backup_post (connection, + con_cls, + &account_pub, + upload_data, + upload_data_size); + hc = *con_cls; + if (NULL != hc) + { + /* Store the async context ID, so we can restore it if + * we get another callack for this request. */ + hc->async_scope_id = aid; + } + return ret; } } for (unsigned int i = 0; NULL != handlers[i].url; i++) @@ -409,8 +419,8 @@ SH_trigger_daemon () if (NULL != mhd_task) { GNUNET_SCHEDULER_cancel (mhd_task); - mhd_task = NULL; - run_daemon (NULL); + mhd_task = GNUNET_SCHEDULER_add_now (&run_daemon, + NULL); } else { @@ -420,6 +430,16 @@ SH_trigger_daemon () /** + * Kick GNUnet Curl scheduler to begin curl interactions. + */ +void +SH_trigger_curl () +{ + GNUNET_CURL_gnunet_scheduler_reschedule (&rc); +} + + +/** * Function that queries MHD's select sets and * starts the task waiting for them. * |