gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 02/04: Added MHD_DAEMON_INFO_FLAGS to get d


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 02/04: Added MHD_DAEMON_INFO_FLAGS to get daemon's flags by MHD_get_daemon_info()
Date: Thu, 16 Mar 2017 15:05:21 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 77bc8103555ea66216af295ccf8f9176e9fa747c
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Mar 16 14:55:53 2017 +0300

    Added MHD_DAEMON_INFO_FLAGS to get daemon's flags by MHD_get_daemon_info()
---
 src/include/microhttpd.h | 18 +++++++++++++++++-
 src/microhttpd/daemon.c  |  2 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 9912427b..79f57a19 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1796,7 +1796,15 @@ enum MHD_DaemonInfoType
    * Request the number of current connections handled by the daemon.
    * No extra arguments should be passed.
    */
-  MHD_DAEMON_INFO_CURRENT_CONNECTIONS
+  MHD_DAEMON_INFO_CURRENT_CONNECTIONS,
+
+  /**
+   * Request the daemon flags.
+   * No extra arguments should be passed.
+   * Note: flags may differ from original 'flags' specified for
+   * daemon, especially if #MHD_USE_AUTO was set.
+   */
+  MHD_DAEMON_INFO_FLAGS
 };
 
 
@@ -3184,6 +3192,14 @@ union MHD_DaemonInfo
    * Number of active connections, for #MHD_DAEMON_INFO_CURRENT_CONNECTIONS.
    */
   unsigned int num_connections;
+
+  /**
+   * Combination of #MHD_FLAG values, for #MHD_DAEMON_INFO_FLAGS.
+   * This value is actually a bitfield.
+   * Note: flags may differ from original 'flags' specified for
+   * daemon, especially if #MHD_USE_AUTO was set.
+   */
+  enum MHD_FLAG flags;
 };
 
 
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index b78aabb0..ec3f325a 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -6259,6 +6259,8 @@ MHD_get_daemon_info (struct MHD_Daemon *daemon,
             }
         }
       return (const union MHD_DaemonInfo *) &daemon->connections;
+    case MHD_DAEMON_INFO_FLAGS:
+      return (const union MHD_DaemonInfo *) &daemon->options;
     default:
       return NULL;
     };

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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