aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-03-14 09:10:20 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-03-14 09:10:20 +0000
commit9dc0b8bd674f71f8ee422b037dc409f2dd4f9487 (patch)
tree32e04cf0045782e10fc3eecc8fa82101b3fb94ec /transact.c
parent20a0097f74bfdec16c17dd7d3eb5968f81ec90c1 (diff)
downloadfetchmail-9dc0b8bd674f71f8ee422b037dc409f2dd4f9487.tar.gz
fetchmail-9dc0b8bd674f71f8ee422b037dc409f2dd4f9487.tar.bz2
fetchmail-9dc0b8bd674f71f8ee422b037dc409f2dd4f9487.zip
merge Mirek's fetchmail-signed.patch
svn path=/branches/BRANCH_6-3/; revision=4734
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/transact.c b/transact.c
index 73ec9d31..d2a241c5 100644
--- a/transact.c
+++ b/transact.c
@@ -91,9 +91,7 @@ static void find_server_names(const char *hdr,
{
char *cp;
- for (cp = nxtaddr((const unsigned char *)hdr);
- cp != NULL;
- cp = nxtaddr(NULL))
+ for (cp = nxtaddr(hdr); cp != NULL; cp = nxtaddr(NULL))
{
char *atsign;
@@ -129,10 +127,10 @@ static void find_server_names(const char *hdr,
for (idp = ctl->server.localdomains; idp; idp = idp->next) {
char *rhs;
- rhs = atsign + (strlen(atsign) - strlen((char *)idp->id));
+ rhs = atsign + (strlen(atsign) - strlen(idp->id));
if (rhs > atsign &&
(rhs[-1] == '.' || rhs[-1] == '@') &&
- strcasecmp(rhs, (char *)idp->id) == 0)
+ strcasecmp(rhs, idp->id) == 0)
{
if (outlevel >= O_DEBUG)
report(stdout, GT_("passed through %s matching %s\n"),
@@ -1316,8 +1314,8 @@ int readbody(int sock, struct query *ctl, flag forward, int len)
/* forward: TRUE to forward */
{
int linelen;
- unsigned char buf[MSGBUFSIZE+4];
- unsigned char *inbufp = buf;
+ char buf[MSGBUFSIZE+4];
+ char *inbufp = buf;
flag issoftline = FALSE;
/*
@@ -1545,7 +1543,8 @@ va_dcl
va_end(ap);
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n");
- if (SockWrite(sock, buf, strlen(buf)) < strlen(buf)) {
+ ok = SockWrite(sock, buf, strlen(buf));
+ if (ok == -1 || (size_t)ok != strlen(buf)) {
/* short write, bail out */
return PS_SOCKET;
}