From: Michael Hampton Date: Sun, 5 Sep 2004 17:39:09 +0000 (+0000) Subject: * Buffered output needs to be flushed in several places. Added calls to X-Git-Tag: v7.86~5274 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=ee36fc3e6d59c7f40015273196bb4452ae941d84 * 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) --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 1bc3cd77c..d95682893 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/citserver.c b/citadel/citserver.c index c38cc0b4c..997ac3890 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -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); diff --git a/citadel/control.c b/citadel/control.c index c145a5a93..86f907cde 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -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); diff --git a/citadel/file_ops.c b/citadel/file_ops.c index cc0fd8ee2..1f94f23e9 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -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); } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 15490f649..17e9603cd 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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); diff --git a/citadel/room_ops.c b/citadel/room_ops.c index a4c2f5ff6..056628209 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1814,6 +1814,7 @@ void cmd_einf(char *ok) return; } cprintf("%d Send info...\n", SEND_LISTING); + flush_output(); do { client_gets(buf); diff --git a/citadel/serv_bio.c b/citadel/serv_bio.c index 926fb3be6..6a6fdc80f 100644 --- a/citadel/serv_bio.c +++ b/citadel/serv_bio.c @@ -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); diff --git a/citadel/serv_chat.c b/citadel/serv_chat.c index ce5770b32..bf6702ae8 100644 --- a/citadel/serv_chat.c +++ b/citadel/serv_chat.c @@ -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")) { diff --git a/citadel/serv_network.c b/citadel/serv_network.c index 1df2620bd..93d670175 100644 --- a/citadel/serv_network.c +++ b/citadel/serv_network.c @@ -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); } diff --git a/citadel/serv_vandelay.c b/citadel/serv_vandelay.c index b8ed51e07..4bd7da5de 100644 --- a/citadel/serv_vandelay.c +++ b/citadel/serv_vandelay.c @@ -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); diff --git a/citadel/serv_vcard.c b/citadel/serv_vcard.c index 4ad02753d..af22b3fda 100644 --- a/citadel/serv_vcard.c +++ b/citadel/serv_vcard.c @@ -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);