projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a934a7
)
* output what we're sending into the BIGBAD_IODBG too.
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 29 Aug 2010 22:00:28 +0000
(22:00 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 29 Aug 2010 22:00:28 +0000
(22:00 +0000)
citadel/sysdep.c
patch
|
blob
|
history
diff --git
a/citadel/sysdep.c
b/citadel/sysdep.c
index f4ac8d70bb5d39ef54b0f68f5b6d384f102bddc3..2e17335d4a73ae7b58412b3128e163d584c5abda 100644
(file)
--- 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);
if (nbytes < 1) return(0);
-// flush_client_inbuf();
Ctx = CC;
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);
if (Ctx->redirect_buffer != NULL) {
StrBufAppendBufPlain(Ctx->redirect_buffer,
buf, nbytes, 0);