* Buffered output needs to be flushed in several places. Added calls to
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 5 Sep 2004 17:39:09 +0000 (17:39 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 5 Sep 2004 17:39:09 +0000 (17:39 +0000)
  flush_output().  (basically anywhere where we send a response and then
  wait for the client, except chat, where we turned it off entirely)

citadel/ChangeLog
citadel/citserver.c
citadel/control.c
citadel/file_ops.c
citadel/msgbase.c
citadel/room_ops.c
citadel/serv_bio.c
citadel/serv_chat.c
citadel/serv_network.c
citadel/serv_vandelay.c
citadel/serv_vcard.c

index 1bc3cd77c9a488781968112188768f9d6c386570..d956828937b92811aeb41a61874dadbc5852b78f 100644 (file)
@@ -1,4 +1,9 @@
  $Log$
+ Revision 625.13  2004/09/05 17:39:09  error
+ * Buffered output needs to be flushed in several places.  Added calls to
+   flush_output().  (basically anywhere where we send a response and then
+   wait for the client, except chat, where we turned it off entirely)
+
  Revision 625.12  2004/09/05 15:41:45  error
  * Network optimizations - buffer output server-side for better network
    utilization; one client-side optimization
@@ -6046,3 +6051,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 c38cc0b4ca05a6b4e82596b45b1e5f517f5925d8..997ac389016fd75e35e3291565a4647a9efe09f0 100644 (file)
@@ -619,6 +619,7 @@ void cmd_emsg(char *mname)
                return;
        }
        cprintf("%d %s\n", SEND_LISTING, targ);
+       flush_output();
 
        while (client_gets(buf), strcmp(buf, "000")) {
                fprintf(mfp, "%s\n", buf);
index c145a5a930eeca087ede2c1cde86afdc1299d74b..86f907cde9aa3f0f65d811781f7d50a52a679065 100644 (file)
@@ -215,6 +215,7 @@ void cmd_conf(char *argbuf)
 
        else if (!strcasecmp(cmd, "SET")) {
                cprintf("%d Send configuration...\n", SEND_LISTING);
+               flush_output();
                a = 0;
                while (client_gets(buf), strcmp(buf, "000")) {
                        switch (a) {
@@ -403,6 +404,7 @@ void cmd_conf(char *argbuf)
        else if (!strcasecmp(cmd, "PUTSYS")) {
                extract(confname, argbuf, 1);
                cprintf("%d %s\n", SEND_LISTING, confname);
+               flush_output();
                confptr = CtdlReadMessageBody("000",
                                config.c_maxmsglen, NULL, 0);
                CtdlPutSysConfig(confname, confptr);
index cc0fd8ee2926e745a2e2bd11e97518111d6c0dbf..1f94f23e931acb8eecff69f36e53e009197ae24d 100644 (file)
@@ -726,6 +726,7 @@ void cmd_writ(char *cmdbuf)
        }
 
        cprintf("%d %d\n", SEND_BINARY, bytes);
+       flush_output();
        client_read(buf, bytes);
        fwrite(buf, bytes, 1, CC->upload_fp);
 }
index 15490f6498a6f1f67e5610e4b3b703efa6d172de..17e9603cd9a9f8d474786867c14215e85ad1efdf 100644 (file)
@@ -2788,6 +2788,7 @@ void cmd_ent0(char *entargs)
 
        /* Read in the message from the client. */
        cprintf("%d send message\n", SEND_LISTING);
+       flush_output();
        msg = CtdlMakeMessage(&CC->user, recp,
                CC->room.QRname, anonymous, format_type,
                masquerade_as, subject, NULL);
index a4c2f5ff601b80fe57ce8073c3386cf0705d6d77..0566282098297fa7d46ddb6fcd2d8c81056e7882 100644 (file)
@@ -1814,6 +1814,7 @@ void cmd_einf(char *ok)
                return;
        }
        cprintf("%d Send info...\n", SEND_LISTING);
+       flush_output();
 
        do {
                client_gets(buf);
index 926fb3be6294009d56712c37c924a022f08c662f..6a6fdc80f22ce97c4b884594ba922c93a60fc175 100644 (file)
@@ -68,6 +68,7 @@ void cmd_ebio(char *cmdbuf) {
                return;
        }
        cprintf("%d  \n",SEND_LISTING);
+       flush_output();
        while(client_gets(buf), strcmp(buf,"000")) {
                if (ftell(fp) < config.c_maxmsglen) {
                        fprintf(fp,"%s\n",buf);
index ce5770b3279e1d9da28d72665cbec6cb34dc7bd7..bf6702ae831a1769ce2cd12299eddc849887e071 100644 (file)
@@ -710,6 +710,7 @@ void cmd_sexp(char *argbuf)
                }
                cprintf("%d Transmit message (will deliver to %d users)\n",
                        SEND_LISTING, message_sent);
+               flush_output();
                x_big_msgbuf = malloc(SIZ);
                memset(x_big_msgbuf, 0, SIZ);
                while (client_gets(x_msg), strcmp(x_msg, "000")) {
index 1df2620bdddd9ede7620451e089dbbb86ebbb649..93d67017541c8056ee039cb1cbb8dda70a33750e 100644 (file)
@@ -389,6 +389,7 @@ void cmd_snet(char *argbuf) {
        }
 
        cprintf("%d %s\n", SEND_LISTING, tempfilename);
+       flush_output();
        while (client_gets(buf), strcmp(buf, "000")) {
                fprintf(fp, "%s\n", buf);
        }
index b8ed51e07d064a36fe118e9331dc0791ac3ae09f..4bd7da5de7a5f187662db318a10cef2d638f73e6 100644 (file)
@@ -536,6 +536,7 @@ void artv_do_import(void) {
        int version;
 
        cprintf("%d sock it to me\n", SEND_LISTING);
+       flush_output();
        while (client_gets(buf), strcmp(buf, "000")) {
 
                lprintf(CTDL_DEBUG, "import keyword: <%s>\n", buf);
index 4ad02753de30878f52de4fbe470c4fe72c0c5ec2..af22b3fda2f44a4997dd47c76d42bb37cfaa54d6 100644 (file)
@@ -561,6 +561,7 @@ void cmd_regi(char *argbuf) {
        strcpy(tmpcountry, "USA");
 
        cprintf("%d Send registration...\n", SEND_LISTING);
+       flush_output();
        a=0;
        while (client_gets(buf), strcmp(buf,"000")) {
                if (a==0) vcard_set_prop(my_vcard, "n", buf, 0);