From: Michael Hampton Date: Sat, 11 Sep 2004 03:13:05 +0000 (+0000) Subject: * Remove calls to the broken flush_output() while I try to figure out what's X-Git-Tag: v7.86~5264 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=0b04ac60f36209e147778281048f8c529b034544 * Remove calls to the broken flush_output() while I try to figure out what's wrong with it. Replaced with unbuffer_output() which does work. --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 8cc10af22..a7b802605 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,8 @@ $Log$ + Revision 625.20 2004/09/11 03:13:04 error + * Remove calls to the broken flush_output() while I try to figure out what's + wrong with it. Replaced with unbuffer_output() which does work. + Revision 625.19 2004/09/10 02:54:26 ajc * Added flush_output() calls to IMAP modules. (Do we need them? Are we buffering IMAP output? Should we?) @@ -6073,4 +6077,3 @@ 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 997ac3890..041963b5a 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -593,6 +593,8 @@ void cmd_emsg(char *mname) char *dirs[2]; int a; + unbuffer_output(); + if (CtdlAccessCheck(ac_aide)) return; extract(buf,mname,0); @@ -619,7 +621,6 @@ 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 86f907cde..93e5324d0 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -214,8 +214,8 @@ void cmd_conf(char *argbuf) } else if (!strcasecmp(cmd, "SET")) { + unbuffer_output(); cprintf("%d Send configuration...\n", SEND_LISTING); - flush_output(); a = 0; while (client_gets(buf), strcmp(buf, "000")) { switch (a) { @@ -403,8 +403,8 @@ void cmd_conf(char *argbuf) else if (!strcasecmp(cmd, "PUTSYS")) { extract(confname, argbuf, 1); + unbuffer_output(); cprintf("%d %s\n", SEND_LISTING, confname); - flush_output(); confptr = CtdlReadMessageBody("000", config.c_maxmsglen, NULL, 0); CtdlPutSysConfig(confname, confptr); diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 056628209..c4b24b409 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1798,6 +1798,8 @@ void cmd_einf(char *ok) char infofilename[SIZ]; char buf[SIZ]; + unbuffer_output(); + if (CtdlAccessCheck(ac_room_aide)) return; if (atoi(ok) == 0) { @@ -1814,7 +1816,6 @@ 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 6a6fdc80f..788693bdf 100644 --- a/citadel/serv_bio.c +++ b/citadel/serv_bio.c @@ -55,6 +55,8 @@ void cmd_ebio(char *cmdbuf) { char buf[SIZ]; FILE *fp; + unbuffer_output(); + if (!(CC->logged_in)) { cprintf("%d Not logged in.\n",ERROR + NOT_LOGGED_IN); return; @@ -68,7 +70,6 @@ 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 bf6702ae8..22984881c 100644 --- a/citadel/serv_chat.c +++ b/citadel/serv_chat.c @@ -708,9 +708,9 @@ void cmd_sexp(char *argbuf) ERROR + RESOURCE_NOT_OPEN, x_user); return; } + unbuffer_output(); 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 93d670175..202c77588 100644 --- a/citadel/serv_network.c +++ b/citadel/serv_network.c @@ -376,6 +376,8 @@ void cmd_snet(char *argbuf) { char buf[SIZ]; FILE *fp; + unbuffer_output(); + if (CtdlAccessCheck(ac_room_aide)) return; safestrncpy(tempfilename, tmpnam(NULL), sizeof tempfilename); assoc_file_name(filename, sizeof filename, &CC->room, "netconfigs"); @@ -389,7 +391,6 @@ 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 4bd7da5de..101e68042 100644 --- a/citadel/serv_vandelay.c +++ b/citadel/serv_vandelay.c @@ -535,8 +535,9 @@ void artv_do_import(void) { char s_version[SIZ]; int version; + unbuffer_output(); + 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 af22b3fda..1ce0b9317 100644 --- a/citadel/serv_vcard.c +++ b/citadel/serv_vcard.c @@ -548,6 +548,8 @@ void cmd_regi(char *argbuf) { char tmpaddress[SIZ]; char tmpcountry[SIZ]; + unbuffer_output(); + if (!(CC->logged_in)) { cprintf("%d Not logged in.\n",ERROR + NOT_LOGGED_IN); return; @@ -561,7 +563,6 @@ 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);