From cfbc3c3717e84ca0f655a843eba1ad006172341c Mon Sep 17 00:00:00 2001 From: aland Date: Tue, 19 Jun 2007 01:49:57 +0000 Subject: [PATCH] Print out which listeners are using what identity --- src/main/listen.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/listen.c b/src/main/listen.c index f09dc95..1606725 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -190,8 +190,13 @@ static int socket_print(rad_listen_t *this, char *buffer, size_t bufsize) len = strlen(buffer); - return len + snprintf(buffer + len, bufsize - len, " port %d", - sock->port); + if (!this->identity) { + return len + snprintf(buffer + len, bufsize - len, " port %d", + sock->port); + } + + return len + snprintf(buffer + len, bufsize - len, " port %d using identity %s", + sock->port, this->identity); } @@ -1260,8 +1265,14 @@ static void detail_free(rad_listen_t *this) static int detail_print(rad_listen_t *this, char *buffer, size_t bufsize) { - return snprintf(buffer, bufsize, "%s", - ((listen_detail_t *)(this->data))->filename); + if (!this->identity) { + return snprintf(buffer, bufsize, "%s", + ((listen_detail_t *)(this->data))->filename); + } + + return snprintf(buffer, bufsize, "%s using identity %s", + ((listen_detail_t *)(this->data))->filename, + this->identity); } static int detail_encode(UNUSED rad_listen_t *this, UNUSED REQUEST *request) -- 2.1.4