gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21406 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r21406 - gnunet/src/transport
Date: Thu, 10 May 2012 12:02:21 +0200

Author: wachs
Date: 2012-05-10 12:02:21 +0200 (Thu, 10 May 2012)
New Revision: 21406

Modified:
   gnunet/src/transport/plugin_transport_http_server.c
Log:
- added additional assertions


Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-05-10 09:24:58 UTC 
(rev 21405)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-05-10 10:02:21 UTC 
(rev 21406)
@@ -376,12 +376,11 @@
   uint32_t tag = 0;
   int direction = GNUNET_SYSERR;
 
-  conn_info =
-      MHD_get_connection_info (mhd_connection,
+  conn_info = MHD_get_connection_info (mhd_connection,
                                MHD_CONNECTION_INFO_CLIENT_ADDRESS);
   if ((conn_info->client_addr->sa_family != AF_INET) &&
       (conn_info->client_addr->sa_family != AF_INET6))
-    return MHD_NO;
+    return NULL;
 
   if ((strlen (&url[1]) >= 105) && (url[104] == ';'))
   {
@@ -482,7 +481,7 @@
         "# HTTP inbound sessions",
         plugin->inbound_sessions,
         GNUNET_NO);
-
+    GNUNET_assert (NULL != s);
     goto found;
   }
   if ((direction == _RECEIVE) && (t->server_recv != NULL))
@@ -506,7 +505,7 @@
         "# HTTP inbound sessions",
         plugin->inbound_sessions,
         GNUNET_NO);
-
+    GNUNET_assert (NULL != s);
     goto found;
   }
 
@@ -538,6 +537,7 @@
     goto error;
   }
   s = create_session (plugin, &target, a, a_len, NULL, NULL);
+  GNUNET_assert (NULL != s);
   s->ats_address_network_type = ats.value;
 
   s->inbound = GNUNET_YES;
@@ -628,6 +628,8 @@
   sc = (*httpSessionCache);
   s = sc->session;
 
+  GNUNET_assert (NULL != s);
+
   /* connection is to be disconnected */
   if (sc->disconnect == GNUNET_YES)
   {
@@ -755,6 +757,7 @@
     return;
 
   s = sc->session;
+  GNUNET_assert (NULL != s);
   GNUNET_assert (NULL != p);
   if (GNUNET_NO == exist_session(p, s))
     return;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]