gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r15405 - in libmicrohttpd: . doc src/daemon src/include


From: gnunet
Subject: [GNUnet-SVN] r15405 - in libmicrohttpd: . doc src/daemon src/include
Date: Fri, 3 Jun 2011 17:31:10 +0200

Author: grothoff
Date: 2011-06-03 17:31:09 +0200 (Fri, 03 Jun 2011)
New Revision: 15405

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/doc/microhttpd.texi
   libmicrohttpd/src/daemon/connection.c
   libmicrohttpd/src/include/microhttpd.h
Log:
new MHD_CONNECTION_INFO_DAEMON

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2011-06-03 15:21:07 UTC (rev 15404)
+++ libmicrohttpd/ChangeLog     2011-06-03 15:31:09 UTC (rev 15405)
@@ -1,3 +1,7 @@
+Fri Jun  3 15:26:42 CEST 2011
+       Adding MHD_CONNECTION_INFO_DAEMON to obtain MHD_Daemon
+       responsible for a given connection. -CG
+
 Wed May 25 14:23:20 CEST 2011
        Trying to fix stutter problem on timeout described by
        David Myers on the mailinglist (5/10/2011). -CG

Modified: libmicrohttpd/doc/microhttpd.texi
===================================================================
--- libmicrohttpd/doc/microhttpd.texi   2011-06-03 15:21:07 UTC (rev 15404)
+++ libmicrohttpd/doc/microhttpd.texi   2011-06-03 15:31:09 UTC (rev 15405)
@@ -733,6 +733,10 @@
 including access to the underlying GNUtls client certificate
 (HTTPS connections only).  Takes no extra arguments.
 
address@hidden MHD_CONNECTION_INFO_DAEMON
+Returns information about @code{struct MHD_Daemon} which manages
+this connection.
+
 @end table
 @end deftp
 

Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c       2011-06-03 15:21:07 UTC (rev 
15404)
+++ libmicrohttpd/src/daemon/connection.c       2011-06-03 15:31:09 UTC (rev 
15405)
@@ -2332,6 +2332,8 @@
 #endif
     case MHD_CONNECTION_INFO_CLIENT_ADDRESS:
       return (const union MHD_ConnectionInfo *) &connection->addr;
+    case MHD_CONNECTION_INFO_DAEMON:
+      return (const union MHD_ConnectionInfo *) &connection->daemon;
     default:
       return NULL;
     };

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2011-06-03 15:21:07 UTC (rev 
15404)
+++ libmicrohttpd/src/include/microhttpd.h      2011-06-03 15:31:09 UTC (rev 
15405)
@@ -714,10 +714,10 @@
   MHD_CONNECTION_INFO_PROTOCOL,
 
   /**
-   * Obtain IP address of the client.
-   * Takes no extra arguments.  Returns a
-   * 'struct sockaddr_in **' by accident; obsolete,
-   * use MHD_CONNECTION_INFO_CLIENT_SOCK_ADDR.
+   * Obtain IP address of the client.  Takes no extra arguments.
+   * Returns essentially a "struct sockaddr **" (since the API returns
+   * a "union MHD_ConnectionInfo *" and that union contains a "struct
+   * sockaddr *").
    */
   MHD_CONNECTION_INFO_CLIENT_ADDRESS,
 
@@ -729,8 +729,13 @@
   /**
    * Get the GNUTLS client certificate handle.
    */
-  MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT
+  MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT,
 
+  /**
+   * Get the 'struct MHD_Daemon' responsible for managing this connection.
+   */
+  MHD_CONNECTION_INFO_DAEMON
+
 };
 
 /**
@@ -1577,6 +1582,12 @@
    * Address information for the client.
    */
   struct sockaddr *client_addr;
+
+  /**
+   * Which daemon manages this connection (useful in case there are many
+   * daemons running).
+   */
+  struct MHD_Daemon *daemon;
 };
 
 /**




reply via email to

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