* debug output for BLOB reading too.
authorWilfried Göesgens <willi@citadel.org>
Sat, 20 Feb 2010 11:53:27 +0000 (11:53 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 20 Feb 2010 11:53:27 +0000 (11:53 +0000)
citadel/sysdep.c

index 416fc7b897a1c70b840e5af4333c35f13b5edcf4..28104218c251f66db999fe9208ea0a9db3a1998e 100644 (file)
@@ -588,6 +588,23 @@ int client_read_blob(StrBuf *Target, int bytes, int timeout)
                              __FUNCTION__,
                              Error);
        }
+       else
+       {
+               char fn [SIZ];
+               FILE *fd;
+
+               snprintf(fn, SIZ, "/tmp/foolog_%s.%d", CCC->ServiceName, CCC->cs_pid);
+
+               fd = fopen(fn, "a+");
+                fprintf(fd, "Read: BufSize: %d BufContent: [",
+                        StrLength(Target));
+               fwrite(ChrPtr(Target), StrLength(Target), 1, fd);
+                fprintf(fd, "]\n");
+               
+                       
+                fclose(fd);
+
+       }
        return retval == bytes;
 }