diff options
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r-- | src/transport/plugin_transport_http.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 798452934..104f8de03 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -994,6 +994,7 @@ static void send_execute (void *cls, | |||
994 | GNUNET_assert ( msg->easy_handle != NULL ); | 994 | GNUNET_assert ( msg->easy_handle != NULL ); |
995 | cs = find_session_by_curlhandle (msg->easy_handle); | 995 | cs = find_session_by_curlhandle (msg->easy_handle); |
996 | GNUNET_assert ( cs != NULL ); | 996 | GNUNET_assert ( cs != NULL ); |
997 | GNUNET_assert ( cs->pending_outbound_msg != NULL ); | ||
997 | switch (msg->msg) | 998 | switch (msg->msg) |
998 | { | 999 | { |
999 | 1000 | ||
@@ -1010,7 +1011,7 @@ static void send_execute (void *cls, | |||
1010 | __LINE__, | 1011 | __LINE__, |
1011 | curl_easy_strerror (msg->data.result)); | 1012 | curl_easy_strerror (msg->data.result)); |
1012 | /* sending msg failed*/ | 1013 | /* sending msg failed*/ |
1013 | if ( NULL != cs->pending_outbound_msg->transmit_cont) | 1014 | if (( NULL != cs->pending_outbound_msg) && ( NULL != cs->pending_outbound_msg->transmit_cont)) |
1014 | cs->pending_outbound_msg->transmit_cont (cs->pending_outbound_msg->transmit_cont_cls,&cs->sender,GNUNET_SYSERR); | 1015 | cs->pending_outbound_msg->transmit_cont (cs->pending_outbound_msg->transmit_cont_cls,&cs->sender,GNUNET_SYSERR); |
1015 | } | 1016 | } |
1016 | else | 1017 | else |
@@ -1024,7 +1025,7 @@ static void send_execute (void *cls, | |||
1024 | cs->curl_handle=NULL; | 1025 | cs->curl_handle=NULL; |
1025 | 1026 | ||
1026 | /* Calling transmit continuation */ | 1027 | /* Calling transmit continuation */ |
1027 | if ( NULL != cs->pending_outbound_msg->transmit_cont) | 1028 | if (( NULL != cs->pending_outbound_msg) && (NULL != cs->pending_outbound_msg->transmit_cont)) |
1028 | cs->pending_outbound_msg->transmit_cont (cs->pending_outbound_msg->transmit_cont_cls,&cs->sender,GNUNET_OK); | 1029 | cs->pending_outbound_msg->transmit_cont (cs->pending_outbound_msg->transmit_cont_cls,&cs->sender,GNUNET_OK); |
1029 | 1030 | ||
1030 | 1031 | ||
@@ -1153,6 +1154,8 @@ http_plugin_send (void *cls, | |||
1153 | struct HTTP_Message * tmp; | 1154 | struct HTTP_Message * tmp; |
1154 | int bytes_sent = 0; | 1155 | int bytes_sent = 0; |
1155 | 1156 | ||
1157 | |||
1158 | address = NULL; | ||
1156 | /* find session for peer */ | 1159 | /* find session for peer */ |
1157 | ses = find_session_by_pi (target); | 1160 | ses = find_session_by_pi (target); |
1158 | if (NULL != ses ) | 1161 | if (NULL != ses ) |
@@ -1211,6 +1214,8 @@ http_plugin_send (void *cls, | |||
1211 | } | 1214 | } |
1212 | } | 1215 | } |
1213 | 1216 | ||
1217 | GNUNET_assert (address != NULL); | ||
1218 | |||
1214 | timeout = to; | 1219 | timeout = to; |
1215 | /* setting up message */ | 1220 | /* setting up message */ |
1216 | msg = GNUNET_malloc (sizeof (struct HTTP_Message)); | 1221 | msg = GNUNET_malloc (sizeof (struct HTTP_Message)); |