diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-22 00:27:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-22 00:27:08 +0000 |
commit | cda323e3494aff476386b5db3f80a3c9fb2347e5 (patch) | |
tree | 6c88de36a008b1c69950a63a57884d9f2282627d /src/transport/plugin_transport_http_client.c | |
parent | a1d7df8eb6f760367286cb609d52d6f7f7532042 (diff) | |
download | gnunet-cda323e3494aff476386b5db3f80a3c9fb2347e5.tar.gz gnunet-cda323e3494aff476386b5db3f80a3c9fb2347e5.zip |
-fix #3233
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 8306ed74f..d54cd6e9e 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -474,9 +474,6 @@ http_client_plugin_send (void *cls, | |||
474 | struct HTTP_Message *msg; | 474 | struct HTTP_Message *msg; |
475 | char *stat_txt; | 475 | char *stat_txt; |
476 | 476 | ||
477 | GNUNET_assert (plugin != NULL); | ||
478 | GNUNET_assert (s != NULL); | ||
479 | |||
480 | /* lookup if session is really existing */ | 477 | /* lookup if session is really existing */ |
481 | if (GNUNET_YES != client_exist_session (plugin, s)) | 478 | if (GNUNET_YES != client_exist_session (plugin, s)) |
482 | { | 479 | { |
@@ -527,7 +524,8 @@ http_client_plugin_send (void *cls, | |||
527 | "Session %p/connection %p: unpausing connection\n", | 524 | "Session %p/connection %p: unpausing connection\n", |
528 | s, s->client_put); | 525 | s, s->client_put); |
529 | s->put_paused = GNUNET_NO; | 526 | s->put_paused = GNUNET_NO; |
530 | curl_easy_pause (s->client_put, CURLPAUSE_CONT); | 527 | if (NULL != s->client_put) |
528 | curl_easy_pause (s->client_put, CURLPAUSE_CONT); | ||
531 | } | 529 | } |
532 | else if (GNUNET_YES == s->put_tmp_disconnected) | 530 | else if (GNUNET_YES == s->put_tmp_disconnected) |
533 | { | 531 | { |
@@ -619,7 +617,7 @@ http_client_session_disconnect (void *cls, | |||
619 | return GNUNET_SYSERR; | 617 | return GNUNET_SYSERR; |
620 | } | 618 | } |
621 | 619 | ||
622 | if (s->client_put != NULL) | 620 | if (NULL != s->client_put) |
623 | { | 621 | { |
624 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 622 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
625 | "Session %p/connection %p: disconnecting PUT connection to peer `%s'\n", | 623 | "Session %p/connection %p: disconnecting PUT connection to peer `%s'\n", |
@@ -644,12 +642,12 @@ http_client_session_disconnect (void *cls, | |||
644 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 642 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; |
645 | } | 643 | } |
646 | 644 | ||
647 | if (s->client_get != NULL) | 645 | if (NULL != s->client_get) |
648 | { | 646 | { |
649 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 647 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
650 | "Session %p/connection %p: disconnecting GET connection to peer `%s'\n", | 648 | "Session %p/connection %p: disconnecting GET connection to peer `%s'\n", |
651 | s, s->client_get, GNUNET_i2s (&s->target)); | 649 | s, s->client_get, |
652 | 650 | GNUNET_i2s (&s->target)); | |
653 | /* remove curl handle from multi handle */ | 651 | /* remove curl handle from multi handle */ |
654 | mret = curl_multi_remove_handle (plugin->curl_multi_handle, s->client_get); | 652 | mret = curl_multi_remove_handle (plugin->curl_multi_handle, s->client_get); |
655 | if (mret != CURLM_OK) | 653 | if (mret != CURLM_OK) |
@@ -663,7 +661,7 @@ http_client_session_disconnect (void *cls, | |||
663 | } | 661 | } |
664 | 662 | ||
665 | msg = s->msg_head; | 663 | msg = s->msg_head; |
666 | while (msg != NULL) | 664 | while (NULL != msg) |
667 | { | 665 | { |
668 | t = msg->next; | 666 | t = msg->next; |
669 | if (NULL != msg->transmit_cont) | 667 | if (NULL != msg->transmit_cont) |
@@ -784,7 +782,8 @@ client_put_disconnect (void *cls, | |||
784 | s, s->client_put); | 782 | s, s->client_put); |
785 | s->put_paused = GNUNET_NO; | 783 | s->put_paused = GNUNET_NO; |
786 | s->put_tmp_disconnecting = GNUNET_YES; | 784 | s->put_tmp_disconnecting = GNUNET_YES; |
787 | curl_easy_pause (s->client_put, CURLPAUSE_CONT); | 785 | if (NULL != s->client_put) |
786 | curl_easy_pause (s->client_put, CURLPAUSE_CONT); | ||
788 | client_schedule (s->plugin, GNUNET_YES); | 787 | client_schedule (s->plugin, GNUNET_YES); |
789 | } | 788 | } |
790 | 789 | ||
@@ -890,8 +889,10 @@ client_wake_up (void *cls, | |||
890 | "Session %p/connection %p: Waking up GET handle\n", | 889 | "Session %p/connection %p: Waking up GET handle\n", |
891 | s, | 890 | s, |
892 | s->client_get); | 891 | s->client_get); |
893 | if (s->client_get != NULL) | 892 | s->put_paused = GNUNET_NO; |
893 | if (NULL != s->client_get) | ||
894 | curl_easy_pause (s->client_get, CURLPAUSE_CONT); | 894 | curl_easy_pause (s->client_get, CURLPAUSE_CONT); |
895 | |||
895 | } | 896 | } |
896 | 897 | ||
897 | 898 | ||