Add remote hostname and IP address to 'Session started.' log message
authorArt Cancro <ajc@citadel.org>
Sun, 20 Jan 2008 04:47:06 +0000 (04:47 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 20 Jan 2008 04:47:06 +0000 (04:47 +0000)
citadel/citserver.c

index 012d839cb5757de320047e8649caf13bc8e72542..cc2b83652d8591abcf8d591b34d07311ce889da8 100644 (file)
@@ -984,7 +984,12 @@ void begin_session(struct CitContext *con)
                con->nologin = 1;
        }
 
-       lprintf(CTDL_NOTICE, "Session started.\n");
+       if (!CC->is_local_socket) {
+               lprintf(CTDL_NOTICE, "Session started from %s [%s].\n", con->cs_host, con->cs_addr);
+       }
+       else {
+               lprintf(CTDL_NOTICE, "Session started via local socket.\n");
+       }
 
        /* Run any session startup routines registered by loadable modules */
        PerformSessionHooks(EVT_START);