1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
--- pop_send.c.org Thu Mar 28 18:22:52 2002
+++ pop_send.c Thu Mar 28 18:26:38 2002
@@ -115,9 +115,14 @@
/* Send the message body */
while(fgets(buffer, MAXMSGLINELEN, p->drop)) {
+ int nchar;
- /* Decrement the lines sent (for a TOP command) */
- if (--msg_lines <= 0) break;
+ nchar = strlen(buffer);
+
+ if(nchar > 0 && buffer[nchar-1] == '\n') {
+ /* Decrement the lines sent (for a TOP command) */
+ if (--msg_lines <= 0) break;
+ }
pop_sendline(p,buffer);
--- pop_updt.c.org Mon Nov 5 19:11:09 2001
+++ pop_updt.c Mon Nov 5 19:15:15 2001
@@ -300,7 +300,12 @@
break;
} else { /* Body */
- if (++body_lines > mp->body_lines)
+ int nchar;
+ nchar = strlen(buffer);
+ if(nchar > 0 && buffer[nchar-1] == '\n') {
+ body_lines++;
+ }
+ if (body_lines > mp->body_lines)
break;
if (fputs(buffer, md) == EOF)
break;
|