]> granicus.if.org Git - libevent/commitdiff
http: const out address param to evcon_get_peer
authorLeon M. George <leon@georgemail.eu>
Tue, 8 Sep 2020 13:38:16 +0000 (15:38 +0200)
committerAzat Khuzhin <azat@libevent.org>
Tue, 8 Sep 2020 21:37:17 +0000 (00:37 +0300)
http.c
include/event2/http.h

diff --git a/http.c b/http.c
index abd255dc3fc3399e96f908c89e850ec9e273fb8b..8afb3600fa59d702f81c7e80d7a0ba84c9171fa9 100644 (file)
--- a/http.c
+++ b/http.c
@@ -2754,7 +2754,7 @@ evhttp_connection_set_closecb(struct evhttp_connection *evcon,
 
 void
 evhttp_connection_get_peer(struct evhttp_connection *evcon,
-    char **address, ev_uint16_t *port)
+    const char **address, ev_uint16_t *port)
 {
        *address = evcon->address;
        *port = evcon->port;
index eba8f237dc73651004457abcf043b55bfba649b8..aef8a45b5e7861407f0ddc6e5a215748e839daff 100644 (file)
@@ -959,7 +959,7 @@ void evhttp_connection_set_closecb(struct evhttp_connection *evcon,
 /** Get the remote address and port associated with this connection. */
 EVENT2_EXPORT_SYMBOL
 void evhttp_connection_get_peer(struct evhttp_connection *evcon,
-    char **address, ev_uint16_t *port);
+    const char **address, ev_uint16_t *port);
 
 /** Get the remote address associated with this connection.
  * extracted from getpeername() OR from nameserver.