projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
491efe6
)
* client_read_blob(): behave the same way in non-ssl as ssl, so we return <0 in case...
author
Wilfried Göesgens
<willi@citadel.org>
Wed, 24 Mar 2010 22:35:27 +0000
(22:35 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Wed, 24 Mar 2010 22:35:27 +0000
(22:35 +0000)
citadel/sysdep.c
patch
|
blob
|
history
diff --git
a/citadel/sysdep.c
b/citadel/sysdep.c
index 1fba5ebd33f92ffece2e7c4e638e89f4a059ca88..41bc7d0e79113d62149535ba6e8fe8a0d20becc0 100644
(file)
--- a/
citadel/sysdep.c
+++ b/
citadel/sysdep.c
@@
-573,10
+573,15
@@
int client_read_blob(StrBuf *Target, int bytes, int timeout)
#ifdef HAVE_OPENSSL
if (CCC->redirect_ssl) {
retval = client_read_sslblob(Target, bytes, timeout);
#ifdef HAVE_OPENSSL
if (CCC->redirect_ssl) {
retval = client_read_sslblob(Target, bytes, timeout);
+ if (retval < 0) {
+ CtdlLogPrintf(CTDL_CRIT,
+ "%s failed\n",
+ __FUNCTION__);
+ }
}
else
#endif
}
else
#endif
-
+ {
retval = StrBufReadBLOBBuffered(Target,
CCC->ReadBuf,
&CCC->Pos,
retval = StrBufReadBLOBBuffered(Target,
CCC->ReadBuf,
&CCC->Pos,
@@
-585,33
+590,35
@@
int client_read_blob(StrBuf *Target, int bytes, int timeout)
bytes,
O_TERM,
&Error);
bytes,
O_TERM,
&Error);
- if (retval < 0) {
- CtdlLogPrintf(CTDL_CRIT,
- "%s failed\n",
- __FUNCTION__);
- return -1;
- }
- else
- {
+ if (retval < 0) {
+ CtdlLogPrintf(CTDL_CRIT,
+ "%s failed: %s\n",
+ __FUNCTION__,
+ Error);
+ return retval;
+ }
+ else
+ {
#ifdef BIGBAD_IODBG
#ifdef BIGBAD_IODBG
- int rv = 0;
- 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));
- rv = fwrite(ChrPtr(Target), StrLength(Target), 1, fd);
- fprintf(fd, "]\n");
-
+ int rv = 0;
+ char fn [SIZ];
+ FILE *fd;
- fclose(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));
+ rv = fwrite(ChrPtr(Target), StrLength(Target), 1, fd);
+ fprintf(fd, "]\n");
+
+
+ fclose(fd);
#endif
#endif
+ }
}
}
- return retval
== bytes
;
+ return retval;
}
int client_read_to(char *buf, int bytes, int timeout)
}
int client_read_to(char *buf, int bytes, int timeout)