gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r12835 - libmicrohttpd/src/daemon


From: gnunet
Subject: [GNUnet-SVN] r12835 - libmicrohttpd/src/daemon
Date: Sat, 4 Sep 2010 19:54:49 +0200

Author: grothoff
Date: 2010-09-04 19:54:49 +0200 (Sat, 04 Sep 2010)
New Revision: 12835

Modified:
   libmicrohttpd/src/daemon/connection.c
   libmicrohttpd/src/daemon/daemon.c
Log:
fix

Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c       2010-09-03 22:01:26 UTC (rev 
12834)
+++ libmicrohttpd/src/daemon/connection.c       2010-09-04 17:54:49 UTC (rev 
12835)
@@ -291,11 +291,6 @@
   CLOSE (connection->socket_fd);
   connection->socket_fd = -1;
   connection->state = MHD_CONNECTION_CLOSED;
-  if (connection->response != NULL)
-    {
-      MHD_destroy_response (connection->response);
-      connection->response = NULL;
-    }
   if ( (NULL != connection->daemon->notify_completed) &&
        (MHD_YES == connection->client_aware) )
     connection->daemon->notify_completed (connection->daemon->
@@ -346,6 +341,7 @@
       return MHD_YES; 
     }
 #endif
+
   ret = response->crc (response->crc_cls,
                        connection->response_write_position,
                        response->data,
@@ -367,7 +363,8 @@
          socket! */
 #if DEBUG_CLOSE
 #if HAVE_MESSAGES
-      MHD_DLOG (connection->daemon, "Closing connection (end of response)\n");
+      MHD_DLOG (connection->daemon, 
+               "Closing connection (end of response)\n");
 #endif
 #endif
       response->total_size = connection->response_write_position;
@@ -700,6 +697,7 @@
             "Error %u (`%s') processing request, closing connection.\n",
             status_code, message);
 #endif
+  EXTRA_CHECK (connection->response == NULL);
   response = MHD_create_response_from_data (strlen (message),
                                             (void *) message, MHD_NO, MHD_NO);
   MHD_queue_response (connection, status_code, response);

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2010-09-03 22:01:26 UTC (rev 12834)
+++ libmicrohttpd/src/daemon/daemon.c   2010-09-04 17:54:49 UTC (rev 12835)
@@ -959,6 +959,11 @@
             gnutls_deinit (pos->tls_session);
 #endif
           MHD_ip_limit_del (daemon, (struct sockaddr*)pos->addr, 
pos->addr_len);
+         if (pos->response != NULL)
+           {
+             MHD_destroy_response (pos->response);
+             pos->response = NULL;
+           }
           free (pos->addr);
           free (pos);
           daemon->max_connections++;




reply via email to

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