[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 04/06: MHD_get_daemon_info(): return bind p
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 04/06: MHD_get_daemon_info(): return bind port number by MHD_DAEMON_INFO_BIND_PORT |
Date: |
Thu, 15 Jun 2017 23:43:29 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 94e7a07828a3c4d2b5f782c1cafc35169d9bc29f
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Jun 15 10:42:22 2017 +0300
MHD_get_daemon_info(): return bind port number by MHD_DAEMON_INFO_BIND_PORT
---
src/include/microhttpd.h | 18 ++++++++++++++++--
src/microhttpd/daemon.c | 2 ++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 2319eef3..de84e5d7 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00095500
+#define MHD_VERSION 0x00095501
/**
* MHD-internal return code for "YES".
@@ -1845,7 +1845,15 @@ enum MHD_DaemonInfoType
* Note: flags may differ from original 'flags' specified for
* daemon, especially if #MHD_USE_AUTO was set.
*/
- MHD_DAEMON_INFO_FLAGS
+ MHD_DAEMON_INFO_FLAGS,
+
+ /**
+ * Request the port number of daemon's listen socket.
+ * No extra arguments should be passed.
+ * Note: if port '0' was specified for #MHD_start_daemon(), returned
+ * value will be real port number.
+ */
+ MHD_DAEMON_INFO_BIND_PORT
};
@@ -3248,6 +3256,11 @@ union MHD_DaemonInfo
MHD_socket listen_fd;
/**
+ * Bind port number, returned for #MHD_DAEMON_INFO_BIND_PORT.
+ */
+ uint16_t port;
+
+ /**
* epoll FD, returned for #MHD_DAEMON_INFO_EPOLL_FD.
*/
int epoll_fd;
@@ -3437,6 +3450,7 @@ enum MHD_FEATURE
/**
* Get whether MHD support automatic detection of bind port number.
+ * @sa #MHD_DAEMON_INFO_BIND_PORT
*/
MHD_FEATURE_AUTODETECT_BIND_PORT = 19
};
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index dfb92b4d..45ecd804 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -6319,6 +6319,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;
+ case MHD_DAEMON_INFO_BIND_PORT:
+ return (const union MHD_DaemonInfo *) &daemon->port;
default:
return NULL;
};
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [libmicrohttpd] branch master updated (8eb8e558 -> e8d937be), gnunet, 2017/06/15
- [GNUnet-SVN] [libmicrohttpd] 05/06: test_daemon: fixed error description, resource leak, gnunet, 2017/06/15
- [GNUnet-SVN] [libmicrohttpd] 01/06: Configure: removed unwanted extra square brackets, gnunet, 2017/06/15
- [GNUnet-SVN] [libmicrohttpd] 02/06: Correctly initialize IPv6 "any" address and non-standard IPv4 "any" address., gnunet, 2017/06/15
- [GNUnet-SVN] [libmicrohttpd] 04/06: MHD_get_daemon_info(): return bind port number by MHD_DAEMON_INFO_BIND_PORT,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 03/06: MHD_start_daemon(): added port autodetection if '0' (autoselect) is used for port number, Added new MHD_FEATURE value MHD_FEATURE_AUTODETECT_BIND_PORT., gnunet, 2017/06/15
- [GNUnet-SVN] [libmicrohttpd] 06/06: Make testsuite parallel build compatible (part 1), gnunet, 2017/06/15