aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-09-06 19:31:25 +0000
committerChristian Grothoff <christian@grothoff.org>2016-09-06 19:31:25 +0000
commitc07388889951945c7d010601409fc412cbffe02e (patch)
tree1218499760897b58dcd4f3dd7998a059f6560c85
parenta773c266ffa318b7257d3f660624edec10505355 (diff)
downloadlibmicrohttpd-c07388889951945c7d010601409fc412cbffe02e.tar.gz
libmicrohttpd-c07388889951945c7d010601409fc412cbffe02e.zip
-add back Martin's fix, he was right
-rw-r--r--ChangeLog6
-rw-r--r--doc/libmicrohttpd.texi19
-rw-r--r--src/include/microhttpd.h2
-rw-r--r--src/microhttpd/connection.c3
4 files changed, 23 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 39f5116e..cf04649d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
12016-09-05 gettextize <bug-gnu-gettext@gnu.org> 1Tue Sep 6 21:29:09 CEST 2016
2 2 Martin was right, "socket_context" should be "void *"
3 * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.8. 3 in `union MHD_ConnectionInfo`. -MS
4 4
5Sun Sep 4 18:16:32 CEST 2016 5Sun Sep 4 18:16:32 CEST 2016
6 Fixing potential memory leak (#4634). -CG 6 Fixing potential memory leak (#4634). -CG
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index f3a96608..de8ccccc 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -2725,26 +2725,33 @@ connection is desired.
2725 2725
2726@item MHD_CONNECTION_INFO_CIPHER_ALGO 2726@item MHD_CONNECTION_INFO_CIPHER_ALGO
2727What cipher algorithm is being used (HTTPS connections only). 2727What cipher algorithm is being used (HTTPS connections only).
2728Takes no extra arguments.
2729@code{NULL} is returned for non-HTTPS connections. 2728@code{NULL} is returned for non-HTTPS connections.
2730 2729
2730Takes no extra arguments.
2731
2731@item MHD_CONNECTION_INFO_PROTOCOL, 2732@item MHD_CONNECTION_INFO_PROTOCOL,
2732Takes no extra arguments. Allows finding out the TLS/SSL protocol used 2733Allows finding out the TLS/SSL protocol used
2733(HTTPS connections only). 2734(HTTPS connections only).
2734@code{NULL} is returned for non-HTTPS connections. 2735@code{NULL} is returned for non-HTTPS connections.
2735 2736
2737Takes no extra arguments.
2738
2736@item MHD_CONNECTION_INFO_CLIENT_ADDRESS 2739@item MHD_CONNECTION_INFO_CLIENT_ADDRESS
2737Returns information about the address of the client. Returns 2740Returns information about the address of the client. Returns
2738essentially a @code{struct sockaddr **} (since the API returns 2741essentially a @code{struct sockaddr **} (since the API returns
2739a @code{union MHD_ConnectionInfo *} and that union contains 2742a @code{union MHD_ConnectionInfo *} and that union contains
2740a @code{struct sockaddr *}). 2743a @code{struct sockaddr *}).
2741 2744
2745Takes no extra arguments.
2746
2742@item MHD_CONNECTION_INFO_GNUTLS_SESSION, 2747@item MHD_CONNECTION_INFO_GNUTLS_SESSION,
2743Takes no extra arguments. Allows access to the underlying GNUtls session, 2748Takes no extra arguments. Allows access to the underlying GNUtls session,
2744including access to the underlying GNUtls client certificate 2749including access to the underlying GNUtls client certificate
2745(HTTPS connections only). Takes no extra arguments. 2750(HTTPS connections only). Takes no extra arguments.
2746@code{NULL} is returned for non-HTTPS connections. 2751@code{NULL} is returned for non-HTTPS connections.
2747 2752
2753Takes no extra arguments.
2754
2748@item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT, 2755@item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT,
2749Dysfunctional (never implemented, deprecated). Use 2756Dysfunctional (never implemented, deprecated). Use
2750MHD_CONNECTION_INFO_GNUTLS_SESSION to get the @code{gnutls_session_t} 2757MHD_CONNECTION_INFO_GNUTLS_SESSION to get the @code{gnutls_session_t}
@@ -2754,6 +2761,8 @@ and then call @code{gnutls_certificate_get_peers()}.
2754Returns information about @code{struct MHD_Daemon} which manages 2761Returns information about @code{struct MHD_Daemon} which manages
2755this connection. 2762this connection.
2756 2763
2764Takes no extra arguments.
2765
2757@item MHD_CONNECTION_INFO_CONNECTION_FD 2766@item MHD_CONNECTION_INFO_CONNECTION_FD
2758Returns the file descriptor (usually a TCP socket) associated with 2767Returns the file descriptor (usually a TCP socket) associated with
2759this connection (in the ``connect-fd'' member of the returned struct). 2768this connection (in the ``connect-fd'' member of the returned struct).
@@ -2766,11 +2775,15 @@ automatically (if the platform supports it). As the connection
2766callbacks are invoked in between, those might be used to set different 2775callbacks are invoked in between, those might be used to set different
2767values for TCP-CORK and TCP-NODELAY in the meantime. 2776values for TCP-CORK and TCP-NODELAY in the meantime.
2768 2777
2778Takes no extra arguments.
2779
2769@item MHD_CONNECTION_INFO_CONNECTION_SUSPENDED 2780@item MHD_CONNECTION_INFO_CONNECTION_SUSPENDED
2770Returns pointer to an integer that is @code{MHD_YES} if the connection 2781Returns pointer to an integer that is @code{MHD_YES} if the connection
2771is currently suspended (and thus can be safely resumed) and 2782is currently suspended (and thus can be safely resumed) and
2772@code{MHD_NO} otherwise. 2783@code{MHD_NO} otherwise.
2773 2784
2785Takes no extra arguments.
2786
2774@item MHD_CONNECTION_INFO_SOCKET_CONTEXT 2787@item MHD_CONNECTION_INFO_SOCKET_CONTEXT
2775Returns the client-specific pointer to a @code{void *} that was 2788Returns the client-specific pointer to a @code{void *} that was
2776(possibly) set during a @code{MHD_NotifyConnectionCallback} when the 2789(possibly) set during a @code{MHD_NotifyConnectionCallback} when the
@@ -2779,6 +2792,8 @@ socket was first accepted. Note that this is NOT the same as the
2779@code{con_cls} is fresh for each HTTP request, while the 2792@code{con_cls} is fresh for each HTTP request, while the
2780@code{socket_context} is fresh for each socket. 2793@code{socket_context} is fresh for each socket.
2781 2794
2795Takes no extra arguments.
2796
2782@end table 2797@end table
2783@end deftp 2798@end deftp
2784 2799
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 5bc7eb15..9d345da2 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1217,7 +1217,7 @@ union MHD_ConnectionInfo
1217 * Socket-specific client context. Points to the same address as 1217 * Socket-specific client context. Points to the same address as
1218 * the "socket_context" of the #MHD_NotifyConnectionCallback. 1218 * the "socket_context" of the #MHD_NotifyConnectionCallback.
1219 */ 1219 */
1220 void **socket_context; 1220 void *socket_context;
1221}; 1221};
1222 1222
1223 1223
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 7b477246..15bdb70c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3205,7 +3205,8 @@ MHD_set_http_callbacks_ (struct MHD_Connection *connection)
3205 */ 3205 */
3206const union MHD_ConnectionInfo * 3206const union MHD_ConnectionInfo *
3207MHD_get_connection_info (struct MHD_Connection *connection, 3207MHD_get_connection_info (struct MHD_Connection *connection,
3208 enum MHD_ConnectionInfoType info_type, ...) 3208 enum MHD_ConnectionInfoType info_type,
3209 ...)
3209{ 3210{
3210 switch (info_type) 3211 switch (info_type)
3211 { 3212 {