]> code.citadel.org Git - citadel.git/commitdiff
* Client now honors EM_GO_AWAY flag, used by the server to request that a
authorArt Cancro <ajc@citadel.org>
Mon, 11 Dec 2000 02:19:26 +0000 (02:19 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 11 Dec 2000 02:19:26 +0000 (02:19 +0000)
  client log off.  (The server doesn't support sending that flag yet, though)

citadel/ChangeLog
citadel/citadel.c
citadel/commands.c

index 8a7fa0a6fe3bbe0ea9c5a55811ce715ed7ed10e1..faa70901333bdf5efe3fc12bc2b9cd1efe2ee851 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 573.45  2000/12/11 02:19:26  ajc
+ * Client now honors EM_GO_AWAY flag, used by the server to request that a
+   client log off.  (The server doesn't support sending that flag yet, though)
+
  Revision 573.44  2000/12/09 06:20:06  ajc
  * A few final touches to the Sleepycat DB back-end
 
@@ -2200,3 +2204,4 @@ 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 43f03f640e8c151ef56c3fba7f921c9b7da440bc..d838321d2124c4486c9ea598dade03771ac23a5a 100644 (file)
@@ -93,6 +93,7 @@ char floor_mode;
 char curr_floor = 0;           /* number of current floor */
 char floorlist[128][256];      /* names of floors */
 char express_msgs = 0;         /* express messages waiting! */
+volatile int termn8 = 0;       /* Set to nonzero to cause a logoff */
 
 extern int rc_ansi_color;      /* ansi color value from citadel.rc */
 
@@ -860,7 +861,6 @@ int main(int argc, char **argv)
        char *telnet_client_host = NULL;
        char *sptr, *sptr2;     /* USed to extract the nonce */
        char hexstring[MD5_HEXSTRING_SIZE];
-       volatile int termn8 = 0;
        int stored_password = 0;
        char password[256];
 
index 9e67b98817a03458281d764a29252a2e10a8262e..e83696d021e870fbb3a859b7bcabfd82717198d5 100644 (file)
@@ -71,6 +71,7 @@ int next_lazy_cmd = 5;
 
 int lines_printed = 0;         /* line count for paginator */
 extern int screenwidth, screenheight;
+extern int termn8;
 
 struct citcmd *cmdlist = NULL;
 
@@ -186,7 +187,7 @@ void print_express(void)
        FILE *outpipe;
        time_t timestamp;
        struct tm *stamp;
-       int flags;
+       int flags = 0;
        char sender[64];
        char node[64];
 
@@ -291,6 +292,12 @@ void print_express(void)
        }
        printf("\n---\n");
        color(BRIGHT_WHITE);
+
+       /* If the page is a Logoff Request, honor it. */
+       if (flags & 2) {
+               termn8 = 1;
+       }
+
 }