aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2003-10-10 20:49:49 +0000
committerEric S. Raymond <esr@thyrsus.com>2003-10-10 20:49:49 +0000
commitd76c2a989ada984ace971fe86f9fc628b4e6358d (patch)
tree48ba8bd1bd1e9bfc8b0f5cf1182f719ab507bd29 /transact.c
parentc4cd27e0012f3a6b514eb75318e8bb74c5c33c11 (diff)
downloadfetchmail-d76c2a989ada984ace971fe86f9fc628b4e6358d.tar.gz
fetchmail-d76c2a989ada984ace971fe86f9fc628b4e6358d.tar.bz2
fetchmail-d76c2a989ada984ace971fe86f9fc628b4e6358d.zip
Storage cleanup for new dup killer code.
svn path=/trunk/; revision=3855
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/transact.c b/transact.c
index b6cdcc8a..843dd7ee 100644
--- a/transact.c
+++ b/transact.c
@@ -408,7 +408,7 @@ int readheaders(int sock,
free(delivered_to);
/* initially, no message digest */
- memset(ctl->thisid, '\0', sizeof(ctl->thisid));
+ memset(ctl->digest, '\0', sizeof(ctl->digest));
msgblk.headers = received_for = delivered_to = NULL;
from_offs = reply_to_offs = resent_from_offs = app_from_offs =
@@ -921,7 +921,7 @@ int readheaders(int sock,
MD5Init(&context);
MD5Update(&context, msgblk.headers, strlen(msgblk.headers));
- MD5Final(ctl->thisid, &context);
+ MD5Final(ctl->digest, &context);
if (!received_for && env_offs == -1 && !delivered_to)
{
@@ -930,8 +930,8 @@ int readheaders(int sock,
* If so there is a one in 18-quadrillion chance this
* code will incorrectly nuke the first message.
*/
- if (memcmp(ctl->lastid, ctl->thisid, sizeof(ctl->lastid)))
- ctl->lastid = ctl->thisid;
+ if (memcmp(ctl->lastdigest, ctl->digest, DIGESTLEN))
+ memcpy(ctl->lastdigest, ctl->digest, DIGESTLEN);
else if (accept_count > 1)
return(PS_REFUSED);
}