From e6116200be29b3c203a3aa047eadf43245475bed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 29 Aug 2010 22:00:28 +0000 Subject: [PATCH] * output what we're sending into the BIGBAD_IODBG too. --- citadel/sysdep.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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); -- 2.30.2