]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.c
Correct logging expressions
[citadel.git] / citadel / context.c
index 382acb47f3d0ea8721fab322c217b936dbf40b7d..f54e3e57d2bab649d8ac905dc6fc46ea01a68e3f 100644 (file)
@@ -301,7 +301,7 @@ void terminate_idle_sessions(void)
        }
        end_critical_section(S_SESSION_TABLE);
        if (killed > 0)
-               CtdlLogPrintf(CTDL_INFO, "Terminated %d idle sessions\n", killed);
+               CtdlLogPrintf(CTDL_INFO, "Scheduled %d idle sessions for termination\n", killed);
        if (longrunners > 0)
                CtdlLogPrintf(CTDL_INFO, "Didn't terminate %d protected idle sessions;\n", killed);
 }
@@ -460,7 +460,7 @@ CitContext *CloneContext(CitContext *CloneMe) {
 
        me->MigrateBuf = NewStrBuf();
        me->RecvBuf.Buf = NewStrBuf();
-
+       
        begin_critical_section(S_SESSION_TABLE);
        {
                me->cs_pid = ++next_pid;
@@ -523,6 +523,8 @@ void CtdlFillSystemContext(CitContext *context, char *name)
        len = cutuserkey(sysname);
        memcpy(context->curr_user, sysname, len + 1);
        context->client_socket = (-1);
+       context->state = CON_SYS;
+       context->ServiceName = name;
 
        /* internal_create_user has the side effect of loading the user regardless of wether they
         * already existed or needed to be created
@@ -577,7 +579,7 @@ void context_cleanup(void)
                rem = ptr->next;
                --num_sessions;
                
-               CtdlLogPrintf(CTDL_DEBUG, "Purging session %d\n", ptr->cs_pid);
+               CtdlLogPrintf(CTDL_DEBUG, "Purging session #%d %s\n", ptr->cs_pid, ptr->ServiceName);
                RemoveContext(ptr);
                free (ptr);
                ptr = rem;