diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2003-10-10 20:49:49 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2003-10-10 20:49:49 +0000 |
commit | d76c2a989ada984ace971fe86f9fc628b4e6358d (patch) | |
tree | 48ba8bd1bd1e9bfc8b0f5cf1182f719ab507bd29 /transact.c | |
parent | c4cd27e0012f3a6b514eb75318e8bb74c5c33c11 (diff) | |
download | fetchmail-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); } |