Made listener_print be CONST
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Sep 2010 09:00:29 +0000 (11:00 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Sep 2010 09:06:33 +0000 (11:06 +0200)
src/include/detail.h
src/include/radiusd.h
src/main/command.c
src/main/detail.c
src/main/listen.c

index 92d9f3e..c781619 100644 (file)
@@ -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);
index 4b5335a..a7b1278 100644 (file)
@@ -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 *);
 
index a51b061..77e5d3f 100644 (file)
@@ -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;
 
index f92b140..5fdb575 100644 (file)
@@ -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",
index 67fef86..7c603e8 100644 (file)
@@ -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;