aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r--src/transport/plugin_transport_http_client.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index cd4710417..2b0b8939e 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -557,8 +557,7 @@ client_reschedule_session_timeout (struct GNUNET_ATS_Session *s)
557 * @param tc gnunet scheduler task context 557 * @param tc gnunet scheduler task context
558 */ 558 */
559static void 559static void
560client_run (void *cls, 560client_run (void *cls);
561 const struct GNUNET_SCHEDULER_TaskContext *tc);
562 561
563 562
564/** 563/**
@@ -997,11 +996,9 @@ client_lookup_session (struct HTTP_Client_Plugin *plugin,
997 * is the delayed task that actually disconnects the PUT. 996 * is the delayed task that actually disconnects the PUT.
998 * 997 *
999 * @param cls the `struct GNUNET_ATS_Session *` with the put 998 * @param cls the `struct GNUNET_ATS_Session *` with the put
1000 * @param tc scheduler context
1001 */ 999 */
1002static void 1000static void
1003client_put_disconnect (void *cls, 1001client_put_disconnect (void *cls)
1004 const struct GNUNET_SCHEDULER_TaskContext *tc)
1005{ 1002{
1006 struct GNUNET_ATS_Session *s = cls; 1003 struct GNUNET_ATS_Session *s = cls;
1007 1004
@@ -1128,15 +1125,15 @@ client_send_cb (void *stream,
1128 * Wake up a curl handle which was suspended 1125 * Wake up a curl handle which was suspended
1129 * 1126 *
1130 * @param cls the session 1127 * @param cls the session
1131 * @param tc task context
1132 */ 1128 */
1133static void 1129static void
1134client_wake_up (void *cls, 1130client_wake_up (void *cls)
1135 const struct GNUNET_SCHEDULER_TaskContext *tc)
1136{ 1131{
1137 struct GNUNET_ATS_Session *s = cls; 1132 struct GNUNET_ATS_Session *s = cls;
1133 const struct GNUNET_SCHEDULER_TaskContext *tc;
1138 1134
1139 s->recv_wakeup_task = NULL; 1135 s->recv_wakeup_task = NULL;
1136 tc = GNUNET_SCHEDULER_get_task_context ();
1140 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1137 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
1141 return; 1138 return;
1142 LOG (GNUNET_ERROR_TYPE_DEBUG, 1139 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1293,11 +1290,9 @@ client_receive (void *stream,
1293 * Task performing curl operations 1290 * Task performing curl operations
1294 * 1291 *
1295 * @param cls plugin as closure 1292 * @param cls plugin as closure
1296 * @param tc scheduler task context
1297 */ 1293 */
1298static void 1294static void
1299client_run (void *cls, 1295client_run (void *cls)
1300 const struct GNUNET_SCHEDULER_TaskContext *tc)
1301{ 1296{
1302 struct HTTP_Client_Plugin *plugin = cls; 1297 struct HTTP_Client_Plugin *plugin = cls;
1303 int running; 1298 int running;
@@ -1306,8 +1301,10 @@ client_run (void *cls,
1306 CURLMsg *msg; 1301 CURLMsg *msg;
1307 int put_request; /* GNUNET_YES if easy handle is put, GNUNET_NO for get */ 1302 int put_request; /* GNUNET_YES if easy handle is put, GNUNET_NO for get */
1308 int msgs_left; 1303 int msgs_left;
1304 const struct GNUNET_SCHEDULER_TaskContext *tc;
1309 1305
1310 plugin->client_perform_task = NULL; 1306 plugin->client_perform_task = NULL;
1307 tc = GNUNET_SCHEDULER_get_task_context ();
1311 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1308 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
1312 return; 1309 return;
1313 1310
@@ -1963,11 +1960,9 @@ http_client_plugin_get_network_for_address (void *cls,
1963 * Session was idle, so disconnect it 1960 * Session was idle, so disconnect it
1964 * 1961 *
1965 * @param cls the `struct GNUNET_ATS_Session` of the idle session 1962 * @param cls the `struct GNUNET_ATS_Session` of the idle session
1966 * @param tc scheduler context
1967 */ 1963 */
1968static void 1964static void
1969client_session_timeout (void *cls, 1965client_session_timeout (void *cls)
1970 const struct GNUNET_SCHEDULER_TaskContext *tc)
1971{ 1966{
1972 struct GNUNET_ATS_Session *s = cls; 1967 struct GNUNET_ATS_Session *s = cls;
1973 struct GNUNET_TIME_Relative left; 1968 struct GNUNET_TIME_Relative left;