Made listener_print be CONST
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Sep 2010 09:08:16 +0000 (11:08 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Sep 2010 09:08:16 +0000 (11:08 +0200)
Manual merge of 3ab506f60fb46010a

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 b7cb2fe..b4ee911 100644 (file)
@@ -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 *);
 
index 1b6e9c3..ea65905 100644 (file)
@@ -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;
 
index ce71a24..c47517b 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 e82d585..02977a5 100644 (file)
@@ -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;