From a88072f3d5f5c061646537f33f2c55355a4778f4 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 14 Jun 2010 12:35:04 +0000 Subject: --- src/transport/plugin_transport_http.c | 9 +++++++-- 1 file 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, GNUNET_assert ( msg->easy_handle != NULL ); cs = find_session_by_curlhandle (msg->easy_handle); GNUNET_assert ( cs != NULL ); + GNUNET_assert ( cs->pending_outbound_msg != NULL ); switch (msg->msg) { @@ -1010,7 +1011,7 @@ static void send_execute (void *cls, __LINE__, curl_easy_strerror (msg->data.result)); /* sending msg failed*/ - if ( NULL != cs->pending_outbound_msg->transmit_cont) + if (( NULL != cs->pending_outbound_msg) && ( NULL != cs->pending_outbound_msg->transmit_cont)) cs->pending_outbound_msg->transmit_cont (cs->pending_outbound_msg->transmit_cont_cls,&cs->sender,GNUNET_SYSERR); } else @@ -1024,7 +1025,7 @@ static void send_execute (void *cls, cs->curl_handle=NULL; /* Calling transmit continuation */ - if ( NULL != cs->pending_outbound_msg->transmit_cont) + if (( NULL != cs->pending_outbound_msg) && (NULL != cs->pending_outbound_msg->transmit_cont)) cs->pending_outbound_msg->transmit_cont (cs->pending_outbound_msg->transmit_cont_cls,&cs->sender,GNUNET_OK); @@ -1153,6 +1154,8 @@ http_plugin_send (void *cls, struct HTTP_Message * tmp; int bytes_sent = 0; + + address = NULL; /* find session for peer */ ses = find_session_by_pi (target); if (NULL != ses ) @@ -1211,6 +1214,8 @@ http_plugin_send (void *cls, } } + GNUNET_assert (address != NULL); + timeout = to; /* setting up message */ msg = GNUNET_malloc (sizeof (struct HTTP_Message)); -- cgit v1.2.3