* Fixed algorithm for reporting "last login"
authorArt Cancro <ajc@citadel.org>
Thu, 13 Feb 2003 22:33:41 +0000 (22:33 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 13 Feb 2003 22:33:41 +0000 (22:33 +0000)
citadel/ChangeLog
citadel/server.h
citadel/user_ops.c

index fa6fcf02c995fec9d897d45fb4ea2261cd7c77a1..eb725e5400d1f051b4fa7391aa0649fafe8e12ed 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 601.132  2003/02/13 22:33:41  ajc
+ * Fixed algorithm for reporting "last login"
+
  Revision 601.131  2003/02/13 21:52:13  ajc
  * IMAP service: fixed bug that was causing the wrong messages (usually *all*
    messages) to be flagged when a STORE or COPY operation was performed.
@@ -4466,4 +4469,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index e2e889330097758d55e50a5a0e1de48320002fb8..261f2793845f02fb50c70d305cdb8c49a285bb91 100644 (file)
@@ -83,9 +83,9 @@ struct CitContext {
        char net_node[PATH_MAX];/* Is the client another Citadel server? */
        int client_socket;
        int cs_pid;             /* session ID */
-       time_t cs_lastupdt;     /* time of last update */
        time_t lastcmd;         /* time of last command executed */
        time_t lastidle;        /* For computing idle time */
+       time_t previous_login;  /* Date/time of previous login */
        char lastcmdname[5];    /* name of last command executed */
        unsigned cs_flags;      /* miscellaneous flags */
        void (*h_command_function) (void) ;     /* service command function */
index 793484236ac0e45ee910c43a10f9bf5f5f99e799..1e7451f32840f08b47f325a0da79be99d0485671 100644 (file)
@@ -424,6 +424,7 @@ void session_startup(void)
 
        lgetuser(&CC->usersupp, CC->curr_user);
        ++(CC->usersupp.timescalled);
+       CC->previous_login = CC->usersupp.lastcall;
        time(&CC->usersupp.lastcall);
 
        /* If this user's name is the name of the system administrator
@@ -470,7 +471,7 @@ void logged_in_response(void)
                CIT_OK, CC->usersupp.fullname, CC->usersupp.axlevel,
                CC->usersupp.timescalled, CC->usersupp.posted,
                CC->usersupp.flags, CC->usersupp.usernum,
-               CC->usersupp.lastcall);
+               CC->previous_login);
 }