* output what we're sending into the BIGBAD_IODBG too.
authorWilfried Göesgens <willi@citadel.org>
Sun, 29 Aug 2010 22:00:28 +0000 (22:00 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 29 Aug 2010 22:00:28 +0000 (22:00 +0000)
citadel/sysdep.c

index f4ac8d70bb5d39ef54b0f68f5b6d384f102bddc3..2e17335d4a73ae7b58412b3128e163d584c5abda 100644 (file)
@@ -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);