X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fsysdep.c;h=2e17335d4a73ae7b58412b3128e163d584c5abda;hb=e6116200be29b3c203a3aa047eadf43245475bed;hp=f4ac8d70bb5d39ef54b0f68f5b6d384f102bddc3;hpb=4a934a743d2ec967b7abc382c887cc3e23a5fc25;p=citadel.git diff --git a/citadel/sysdep.c b/citadel/sysdep.c index f4ac8d70b..2e17335d4 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -512,8 +512,27 @@ int client_write(const char *buf, int nbytes) if (nbytes < 1) return(0); -// flush_client_inbuf(); Ctx = CC; + +#ifdef BIGBAD_IODBG + { + int rv = 0; + char fn [SIZ]; + FILE *fd; + + snprintf(fn, SIZ, "/tmp/foolog_%s.%d", Ctx->ServiceName, Ctx->cs_pid); + + fd = fopen(fn, "a+"); + fprintf(fd, "Sending: BufSize: %d BufContent: [", + nbytes); + rv = fwrite(buf, nbytes, 1, fd); + fprintf(fd, "]\n"); + + + fclose(fd); + } +#endif +// flush_client_inbuf(); if (Ctx->redirect_buffer != NULL) { StrBufAppendBufPlain(Ctx->redirect_buffer, buf, nbytes, 0);