diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-11-05 18:53:44 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-11-05 18:53:44 +0000 |
commit | 244bb7f06456e4ae469b90f9298b77dcc7418874 (patch) | |
tree | 136e2fa78f756a75543cc146c096c46760563b07 /src/transport/plugin_transport_http_server.c | |
parent | b29a4bb3ea4d12ef4a3824f3a40c936d761116d8 (diff) | |
download | gnunet-244bb7f06456e4ae469b90f9298b77dcc7418874.tar.gz gnunet-244bb7f06456e4ae469b90f9298b77dcc7418874.zip |
fix
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index d447846ef..8265d827c 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -530,18 +530,24 @@ http_server_plugin_send (void *cls, | |||
530 | GNUNET_break (0); | 530 | GNUNET_break (0); |
531 | return GNUNET_SYSERR; | 531 | return GNUNET_SYSERR; |
532 | } | 532 | } |
533 | if ((NULL == session->server_send) && (GNUNET_NO == session->connect_in_progress)) | 533 | if (NULL == session->server_send) |
534 | { | 534 | { |
535 | if (GNUNET_NO == session->connect_in_progress) | ||
536 | { | ||
535 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, session->plugin->name, | 537 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, session->plugin->name, |
536 | "Session %p/connection %p: Sending message with %u bytes to peer `%s' with FAILED\n", | 538 | "Session %p/connection %p: Sending message with %u bytes to peer `%s' with FAILED\n", |
537 | session, session->server_send, | 539 | session, session->server_send, |
538 | msgbuf_size, GNUNET_i2s (&session->target)); | 540 | msgbuf_size, GNUNET_i2s (&session->target)); |
539 | GNUNET_break (0); | 541 | GNUNET_break (0); |
540 | return GNUNET_SYSERR; | 542 | return GNUNET_SYSERR; |
543 | } | ||
544 | } | ||
545 | else | ||
546 | { | ||
547 | if (GNUNET_YES == session->server_send->disconnect) | ||
548 | return GNUNET_SYSERR; | ||
541 | } | 549 | } |
542 | 550 | ||
543 | if ((NULL != session->server_send) && (GNUNET_YES == session->server_send->disconnect)) | ||
544 | return GNUNET_SYSERR; | ||
545 | 551 | ||
546 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, session->plugin->name, | 552 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, session->plugin->name, |
547 | "Session %p/connection %p: Sending message with %u to peer `%s' with \n", | 553 | "Session %p/connection %p: Sending message with %u to peer `%s' with \n", |
@@ -566,9 +572,13 @@ http_server_plugin_send (void *cls, | |||
566 | stat_txt, msgbuf_size, GNUNET_NO); | 572 | stat_txt, msgbuf_size, GNUNET_NO); |
567 | GNUNET_free (stat_txt); | 573 | GNUNET_free (stat_txt); |
568 | 574 | ||
569 | server_reschedule (session->plugin, session->server_send->mhd_daemon, | 575 | if (NULL != session->server_send) |
570 | (NULL != session->server_send) ? GNUNET_YES : GNUNET_NO); | 576 | { |
571 | server_reschedule_session_timeout (session); | 577 | server_reschedule (session->plugin, |
578 | session->server_send->mhd_daemon, | ||
579 | GNUNET_YES); | ||
580 | server_reschedule_session_timeout (session); | ||
581 | } | ||
572 | return bytes_sent; | 582 | return bytes_sent; |
573 | } | 583 | } |
574 | 584 | ||