diff --git a/http.c b/http.c index abd255dc..8afb3600 100644 --- 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; diff --git a/include/event2/http.h b/include/event2/http.h index eba8f237..aef8a45b 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -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.