aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-31 20:59:49 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-31 20:59:49 +0000
commit22d982d05f63fd484376de3124bf92a4620603d6 (patch)
treedd6d42ea70a711f6ed25265eca155a772b1dd8cf
parent1f633b2a7d4356aa1ef6653f56cb53fc47695c74 (diff)
downloadgnunet-22d982d05f63fd484376de3124bf92a4620603d6.tar.gz
gnunet-22d982d05f63fd484376de3124bf92a4620603d6.zip
-removing assertion that seems bogus
-rw-r--r--src/transport/plugin_transport_http_server.c16
1 files 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)
349 } 349 }
350 } 350 }
351 351
352 struct Plugin *plugin = s->plugin; 352 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
353 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
354 "Server: %X: sent %u bytes\n", s, bytes_read); 353 "Server: %X: sent %u bytes\n", s, bytes_read);
355 354
356 return bytes_read; 355 return bytes_read;
357} 356}
358 357
358
359static struct Session * 359static struct Session *
360server_lookup_session (struct Plugin *plugin, 360server_lookup_session (struct Plugin *plugin,
361 struct ServerConnection * sc) 361 struct ServerConnection * sc)
362{ 362{
363 struct Session *s; 363 struct Session *s;
364
364 for (s = plugin->head; NULL != s; s = s->next) 365 for (s = plugin->head; NULL != s; s = s->next)
365 {
366 if ((s->server_recv == sc) || (s->server_send == sc)) 366 if ((s->server_recv == sc) || (s->server_send == sc))
367 return s; 367 return s;
368 }
369
370 for (s = plugin->server_semi_head; NULL != s; s = s->next) 368 for (s = plugin->server_semi_head; NULL != s; s = s->next)
371 {
372 if ((s->server_recv == sc) || (s->server_send == sc)) 369 if ((s->server_recv == sc) || (s->server_send == sc))
373 return s; 370 return s;
374 } 371 return NULL;
375 return s;
376} 372}
377 373
378 374
@@ -624,9 +620,9 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
624 int res = MHD_YES; 620 int res = MHD_YES;
625 621
626 GNUNET_assert (cls != NULL); 622 GNUNET_assert (cls != NULL);
627 /* new connection */
628 if (sc == NULL) 623 if (sc == NULL)
629 { 624 {
625 /* new connection */
630 sc = server_lookup_serverconnection (plugin, mhd_connection, url, method); 626 sc = server_lookup_serverconnection (plugin, mhd_connection, url, method);
631 if (sc != NULL) 627 if (sc != NULL)
632 (*httpSessionCache) = sc; 628 (*httpSessionCache) = sc;
@@ -642,10 +638,10 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
642 } 638 }
643 else 639 else
644 { 640 {
641 /* 'old' connection */
645 if (NULL == server_lookup_session (plugin, sc)) 642 if (NULL == server_lookup_session (plugin, sc))
646 { 643 {
647 /* Session was already disconnected */ 644 /* Session was already disconnected */
648 GNUNET_break (0);
649 return MHD_NO; 645 return MHD_NO;
650 } 646 }
651 } 647 }