From: Alan T. DeKok Date: Tue, 21 Sep 2010 09:00:29 +0000 (+0200) Subject: Made listener_print be CONST X-Git-Tag: release_2_1_10~12 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=3ab506f60fb46010a;hp=bdb08b86e40ed24dc53934b48ab4b253fb6ba171 Made listener_print be CONST --- diff --git a/src/include/detail.h b/src/include/detail.h index 92d9f3e..c781619 100644 --- a/src/include/detail.h +++ b/src/include/detail.h @@ -51,7 +51,7 @@ int detail_recv(rad_listen_t *listener, RAD_REQUEST_FUNP *pfun, REQUEST **prequest); int detail_send(rad_listen_t *listener, REQUEST *request); void detail_free(rad_listen_t *this); -int detail_print(rad_listen_t *this, char *buffer, size_t bufsize); +int detail_print(const rad_listen_t *this, char *buffer, size_t bufsize); int detail_encode(UNUSED rad_listen_t *this, UNUSED REQUEST *request); int detail_decode(UNUSED rad_listen_t *this, UNUSED REQUEST *request); int detail_parse(CONF_SECTION *cs, rad_listen_t *this); diff --git a/src/include/radiusd.h b/src/include/radiusd.h index 4b5335a..a7b1278 100644 --- a/src/include/radiusd.h +++ b/src/include/radiusd.h @@ -301,7 +301,7 @@ typedef struct pair_list { typedef int (*rad_listen_recv_t)(rad_listen_t *, RAD_REQUEST_FUNP *, REQUEST **); typedef int (*rad_listen_send_t)(rad_listen_t *, REQUEST *); -typedef int (*rad_listen_print_t)(rad_listen_t *, char *, size_t); +typedef int (*rad_listen_print_t)(const rad_listen_t *, char *, size_t); typedef int (*rad_listen_encode_t)(rad_listen_t *, REQUEST *); typedef int (*rad_listen_decode_t)(rad_listen_t *, REQUEST *); diff --git a/src/main/command.c b/src/main/command.c index a51b061..77e5d3f 100644 --- a/src/main/command.c +++ b/src/main/command.c @@ -1921,7 +1921,7 @@ static int command_socket_parse(CONF_SECTION *cs, rad_listen_t *this) return 0; } -static int command_socket_print(rad_listen_t *this, char *buffer, size_t bufsize) +static int command_socket_print(const rad_listen_t *this, char *buffer, size_t bufsize) { fr_command_socket_t *sock = this->data; diff --git a/src/main/detail.c b/src/main/detail.c index f92b140..5fdb575 100644 --- a/src/main/detail.c +++ b/src/main/detail.c @@ -750,7 +750,7 @@ void detail_free(rad_listen_t *this) } -int detail_print(rad_listen_t *this, char *buffer, size_t bufsize) +int detail_print(const rad_listen_t *this, char *buffer, size_t bufsize) { if (!this->server) { return snprintf(buffer, bufsize, "%s", diff --git a/src/main/listen.c b/src/main/listen.c index 67fef86..7c603e8 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -374,7 +374,7 @@ static int rad_status_server(REQUEST *request) } -static int socket_print(rad_listen_t *this, char *buffer, size_t bufsize) +static int socket_print(const rad_listen_t *this, char *buffer, size_t bufsize) { size_t len; listen_socket_t *sock = this->data;