diff options
author | aaron <aaron@7b491191-dbf0-0310-aff6-d879d4d69008> | 2004-05-04 00:22:35 +0000 |
---|---|---|
committer | aaron <aaron@7b491191-dbf0-0310-aff6-d879d4d69008> | 2004-05-04 00:22:35 +0000 |
commit | 48b5c2dd5cffaa1fb58c789d19720176a6811318 (patch) | |
tree | 036e3089e1dadd597ca85bf8aa3c5f9d7e697aeb /pipe.c | |
parent | 54e8bbf237e4d2dab7fca04bb8e857da934ed829 (diff) |
Added a ring buffer to help find the end-of-message sequence
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1116 7b491191-dbf0-0310-aff6-d879d4d69008
Diffstat (limited to 'pipe.c')
-rw-r--r-- | pipe.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -467,7 +467,10 @@ static int store_message_temp(FILE * instream, && ringbuf[(ringpos - 5) % RING_SIZE] == '\r') { /* Back off the trailing "\r\n.\r" (last \n not copied yet) * and set the myeof flag, stopping this loop. */ - usedmem -= 4; + if (usedmem > 4) + usedmem -= 4; + else + usedmem = 0; myeof = 1; } else { /* Copy the current character into the storage buffer. */ |