gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37816 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37816 - libmicrohttpd/src/microhttpd
Date: Sun, 28 Aug 2016 10:41:46 +0200

Author: grothoff
Date: 2016-08-28 10:41:46 +0200 (Sun, 28 Aug 2016)
New Revision: 37816

Modified:
   libmicrohttpd/src/microhttpd/internal.h
   libmicrohttpd/src/microhttpd/response.c
Log:
-fix ftbfs

Modified: libmicrohttpd/src/microhttpd/internal.h
===================================================================
--- libmicrohttpd/src/microhttpd/internal.h     2016-08-27 19:31:32 UTC (rev 
37815)
+++ libmicrohttpd/src/microhttpd/internal.h     2016-08-28 08:41:46 UTC (rev 
37816)
@@ -147,22 +147,22 @@
   /**
    * We are waiting to be able to read.
    */
-  MHD_EVENT_LOOP_INFO_READ = 0,
+  MHD_EVENT_LOOP_INFO_READ = 1,
 
   /**
    * We are waiting to be able to write.
    */
-  MHD_EVENT_LOOP_INFO_WRITE = 1,
+  MHD_EVENT_LOOP_INFO_WRITE = 2,
 
   /**
    * We are waiting for the application to provide data.
    */
-  MHD_EVENT_LOOP_INFO_BLOCK = 2,
+  MHD_EVENT_LOOP_INFO_BLOCK = 4,
 
   /**
    * We are finished and are awaiting cleanup.
    */
-  MHD_EVENT_LOOP_INFO_CLEANUP = 3
+  MHD_EVENT_LOOP_INFO_CLEANUP = 8
 };
 
 
@@ -886,7 +886,57 @@
   int resuming;
 };
 
+
 /**
+ * Handle given to the application to manage special
+ * actions relating to MHD responses that "upgrade"
+ * the HTTP protocol (i.e. to WebSockets).
+ */
+struct MHD_UpgradeResponseHandle
+{
+
+  /**
+   * Kept in a DLL per daemon.
+   */
+  struct MHD_UpgradeResponseHandle *next;
+
+  /**
+   * Kept in a DLL per daemon.
+   */
+  struct MHD_UpgradeResponseHandle *prev;
+
+  /**
+   * The connection for which this is an upgrade handle.  Note that
+   * because a response may be shared over many connections, this may
+   * not be the only upgrade handle for the response of this connection.
+   */
+  struct MHD_Connection *connection;
+
+  /**
+   * The socket we gave to the application (r/w).
+   */
+  MHD_socket app_socket;
+
+  /**
+   * IO-state of the @e app_socket.
+   */
+  enum MHD_ConnectionEventLoopInfo celi_app;
+
+  /**
+   * If @a app_sock was a socketpair, our end of it, otherwise
+   * #MHD_INVALID_SOCKET; (r/w).
+   */
+  MHD_socket mhd_socket;
+
+  /**
+   * IO-state of the @e mhd_socket.
+   */
+  enum MHD_ConnectionEventLoopInfo celi_mhd;
+
+};
+
+
+/**
  * Signature of function called to log URI accesses.
  *
  * @param cls closure

Modified: libmicrohttpd/src/microhttpd/response.c
===================================================================
--- libmicrohttpd/src/microhttpd/response.c     2016-08-27 19:31:32 UTC (rev 
37815)
+++ libmicrohttpd/src/microhttpd/response.c     2016-08-28 08:41:46 UTC (rev 
37816)
@@ -581,35 +581,6 @@
 
 
 /**
- * Handle given to the application to manage special
- * actions relating to MHD responses that "upgrade"
- * the HTTP protocol (i.e. to WebSockets).
- */
-struct MHD_UpgradeResponseHandle
-{
-
-  /**
-   * The connection for which this is an upgrade handle.  Note that
-   * because a response may be shared over many connections, this may
-   * not be the only upgrade handle for the response of this connection.
-   */
-  struct MHD_Connection *connection;
-
-  /**
-   * The socket we gave to the application (r/w).
-   */
-  MHD_socket app_socket;
-
-  /**
-   * If @a app_sock was a socketpair, our end of it, otherwise
-   * #MHD_INVALID_SOCKET; (r/w).
-   */
-  MHD_socket mhd_socket;
-
-};
-
-
-/**
  * This connection-specific callback is provided by MHD to
  * applications (unusual) during the #MHD_UpgradeHandler.
  * It allows applications to perform 'special' actions on
@@ -702,7 +673,7 @@
     connection->read_buffer_offset = 0;
     response->upgrade_handler (response->upgrade_handler_cls,
                                connection,
-                               connection->con_cls,
+                               connection->client_context,
                                connection->read_buffer,
                                rbo,
                                urh->app_socket,
@@ -723,6 +694,7 @@
   connection->read_buffer_offset = 0;
   response->upgrade_handler (response->upgrade_handler_cls,
                              connection,
+                             connection->client_context,
                              connection->read_buffer,
                              rbo,
                              connection->socket_fd,




reply via email to

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