From: Alan T. DeKok Date: Tue, 21 Sep 2010 09:08:16 +0000 (+0200) Subject: Made listener_print be CONST X-Git-Tag: release_3_0_0_beta0~1230 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=51201aa52650f9f0b27d0915a56733ed6bf40333 Made listener_print be CONST Manual merge of 3ab506f60fb46010a --- 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 b7cb2fe..b4ee911 100644 --- a/src/include/radiusd.h +++ b/src/include/radiusd.h @@ -307,7 +307,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 1b6e9c3..ea65905 100644 --- a/src/main/command.c +++ b/src/main/command.c @@ -1971,7 +1971,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 ce71a24..c47517b 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 e82d585..02977a5 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -620,7 +620,7 @@ static int auth_tcp_accept(rad_listen_t *listener, /* * This function is stupid and complicated. */ -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;