From: Wilfried Göesgens Date: Sun, 29 Aug 2010 22:00:28 +0000 (+0000) Subject: * output what we're sending into the BIGBAD_IODBG too. X-Git-Tag: v8.01~812 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e6116200be29b3c203a3aa047eadf43245475bed * output what we're sending into the BIGBAD_IODBG too. --- 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);