* Changed all the "200 ok" responses to more descriptive strings
authorArt Cancro <ajc@citadel.org>
Thu, 10 Aug 2000 02:42:13 +0000 (02:42 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 10 Aug 2000 02:42:13 +0000 (02:42 +0000)
* Added a *temporary* protocol sync check.  Remove this!

citadel/ChangeLog
citadel/citadel.c
citadel/commands.c
citadel/policy.c
citadel/serv_network.c
citadel/user_ops.c

index 3c3afcd23467c56a95da148f9ac4f2a477f9fc6a..e68930345a7335601a0db881706ed2589dc7ace3 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 572.24  2000/08/10 02:42:13  ajc
+ * Changed all the "200 ok" responses to more descriptive strings
+ * Added a *temporary* protocol sync check.  Remove this!
+
  Revision 572.23  2000/08/09 17:14:34  ajc
  msgbase.c: fixed a bug in
             remove_any_whitespace_to_the_left_or_right_of_at_symbol() that was
@@ -1983,3 +1987,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Initial CVS import 
+
index 79589cb566be8ffd34504bd82426d7a5f771a42d..c13d9d9a8da450275c1af06e7a967167a3980d94 100644 (file)
@@ -823,6 +823,35 @@ void enternew(char *desc, char *buf, int maxlen)
        newprompt(bbb, buf, maxlen);
 }
 
+
+void proto_sync_check(void) {          /* FIXME ... remove this */
+       char buf[256];
+       char token[256];
+       FILE *fp;
+
+       safestrncpy(token, tmpnam(NULL), sizeof token);
+       sprintf(buf, "ECHO %s", token);
+       serv_puts(buf);
+       serv_gets(buf);
+       if (!strcmp(&buf[4], token)) return;
+
+       fp = fopen(token, "w");
+       fprintf(fp, "%s\n", buf);
+       while (serv_gets(buf), strcmp(&buf[4], token)) {
+               fprintf(fp, "%s\n", buf);
+       }
+       fclose(fp);
+
+       sprintf(buf, "gedit %s &", token);
+       system(buf);
+       sleep(3);
+       unlink(token);
+}
+
+
+
+
+
 /*
  * main
  */
@@ -838,8 +867,6 @@ int main(int argc, char **argv)
        sttybbs(SB_SAVE);       /* Store the old terminal parameters */
        load_command_set();     /* parse the citadel.rc file */
        sttybbs(SB_NO_INTR);    /* Install the new ones */
-       signal(SIGINT, SIG_IGN);
-       signal(SIGQUIT, SIG_IGN);
        signal(SIGHUP, dropcarr);       /* Cleanup gracefully if carrier is dropped */
        signal(SIGTERM, dropcarr);      /* Cleanup gracefully if terminated */
        signal(SIGCONT, catch_sigcont);         /* Catch SIGCONT so we can reset terminal */
@@ -1033,8 +1060,7 @@ PWOK:     printf("%s\nAccess level: %d (%s)\nUser #%ld / Call #%d\n",
 
        do {                    /* MAIN LOOP OF PROGRAM */
 
-               signal(SIGINT, SIG_IGN);
-               signal(SIGQUIT, SIG_IGN);
+               proto_sync_check();     /* FIXME ... remove this */
                mcmd = getcmd(argbuf);
 
 #ifdef TIOCGWINSZ
index ab656b07e9b4e636267443d48578a5a3de53a50b..dc1461b2dbae0dbe1ade654d5c584a6226c3a4f6 100644 (file)
@@ -225,19 +225,17 @@ static void really_do_keepalive(void) {
        char buf[256];
 
        time(&idlet);
-       if (keepalives_enabled != KA_NO) {
+       if (keepalives_enabled == KA_YES) {
                serv_puts("NOOP");
-               if (keepalives_enabled == KA_YES) {
-                       serv_gets(buf);
-                       if (buf[3] == '*') {
-                               express_msgs = 1;
-                               if (ok_to_interrupt == 1) {
-                                       printf("\r%64s\r", "");
-                                       print_express();
-                                       printf("%s%c ", room_name,
-                                              room_prompt(room_flags));
-                                       fflush(stdout);
-                               }
+               serv_gets(buf);
+               if (buf[3] == '*') {
+                       express_msgs = 1;
+                       if (ok_to_interrupt == 1) {
+                               printf("\r%64s\r", "");
+                               print_express();
+                               printf("%s%c ", room_name,
+                                      room_prompt(room_flags));
+                               fflush(stdout);
                        }
                }
        }
index b3223f14390712e9634f82024774ece5cbbcea3b..2415c124fe024cdfca4e91b02def5a5d63633859 100644 (file)
@@ -104,7 +104,7 @@ void cmd_spex(char *argbuf) {
                lgetroom(&CC->quickroom, CC->quickroom.QRname);
                memcpy(&CC->quickroom.QRep, &exp, sizeof(struct ExpirePolicy));
                lputroom(&CC->quickroom);
-               cprintf("%d ok\n", OK);
+               cprintf("%d Room expire policy set.\n", OK);
                return;
                }
 
@@ -118,7 +118,7 @@ void cmd_spex(char *argbuf) {
                lgetfloor(&flbuf, CC->quickroom.QRfloor);
                memcpy(&flbuf.f_ep, &exp, sizeof(struct ExpirePolicy));
                lputfloor(&flbuf, CC->quickroom.QRfloor);
-               cprintf("%d ok\n", OK);
+               cprintf("%d Floor expire policy set.\n", OK);
                return;
                }
 
@@ -130,7 +130,7 @@ void cmd_spex(char *argbuf) {
                        }
                memcpy(&config.c_ep, &exp, sizeof(struct ExpirePolicy));
                put_config();
-               cprintf("%d ok\n", OK);
+               cprintf("%d Site expire policy set.\n", OK);
                return;
                }
 
index 87bc6f1a318334dea469c4494e74cce66a990af7..8c900a0c2d36d473c0f42128ab3b7104c847cb84 100644 (file)
@@ -190,7 +190,7 @@ void cmd_batc(char *argbuf) {
 
        network_spoolout_current_room();
 
-       cprintf("%d ok\n", OK);
+       cprintf("%d FIXME cmd_batc() ok\n", OK);
 }
 
 
index e24cfa9562f9761496657b54fbc41c58aa1d0ad9..3f9033b4b89e7432a9a47fbdc500643803ebfa0f 100644 (file)
@@ -995,7 +995,7 @@ void cmd_vali(char *v_args)
                        }
                }
 
-       cprintf("%d ok\n",OK);
+       cprintf("%d User '%s' validated.\n", OK, userbuf.fullname);
        }