From 22d982d05f63fd484376de3124bf92a4620603d6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 31 May 2012 20:59:49 +0000 Subject: [PATCH] -removing assertion that seems bogus --- src/transport/plugin_transport_http_server.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 39e69860c..1afbaeb9e 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -349,30 +349,26 @@ server_send_callback (void *cls, uint64_t pos, char *buf, size_t max) } } - struct Plugin *plugin = s->plugin; - GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, + GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name, "Server: %X: sent %u bytes\n", s, bytes_read); return bytes_read; } + static struct Session * server_lookup_session (struct Plugin *plugin, struct ServerConnection * sc) { struct Session *s; + for (s = plugin->head; NULL != s; s = s->next) - { if ((s->server_recv == sc) || (s->server_send == sc)) return s; - } - for (s = plugin->server_semi_head; NULL != s; s = s->next) - { if ((s->server_recv == sc) || (s->server_send == sc)) return s; - } - return s; + return NULL; } @@ -624,9 +620,9 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, int res = MHD_YES; GNUNET_assert (cls != NULL); - /* new connection */ if (sc == NULL) { + /* new connection */ sc = server_lookup_serverconnection (plugin, mhd_connection, url, method); if (sc != NULL) (*httpSessionCache) = sc; @@ -642,10 +638,10 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, } else { + /* 'old' connection */ if (NULL == server_lookup_session (plugin, sc)) { /* Session was already disconnected */ - GNUNET_break (0); return MHD_NO; } } -- 2.25.1