Commit 3f69e162 3f69e162d9849ef1783a662011bf25ca71a1d7a5 by Sergey Poznyakoff

Bugfix

* libproto/mbox/mboxscan.c (mbox_scan_internal): Fix
body size calculation: -1 was returned for empty body.
Bug reported by Con Tassios <ct@swin.edu.au>.
* po/POTFILES.in: Add mail/mailvar.c
1 parent 1c1539ff
...@@ -385,15 +385,15 @@ mbox_scan_internal (mu_mailbox_t mailbox, mbox_message_t mum, ...@@ -385,15 +385,15 @@ mbox_scan_internal (mu_mailbox_t mailbox, mbox_message_t mum,
385 } 385 }
386 } 386 }
387 387
388 newline = nl; 388 newline = (inbody && lines) ? nl : 0;
389 389
390 /* Every 100 mesgs update the lock, it should be every minute. */ 390 /* Every 100 mesgs update the lock, it should be every minute. */
391 if ((mud->messages_count % 100) == 0) 391 if ((mud->messages_count % 100) == 0)
392 mu_locker_touchlock (mailbox->locker); 392 mu_locker_touchlock (mailbox->locker);
393 393
394 /* Ping them every 1000 lines. Should be tunable. */ 394 /* Ping them every 1000 lines. Should be tunable. */
395 if (flags & MBOX_SCAN_NOTIFY) 395 if (flags & MBOX_SCAN_NOTIFY)
396 if (((lines +1) % 1000) == 0) 396 if (((lines + 1) % 1000) == 0)
397 DISPATCH_PROGRESS (mailbox, mud); 397 DISPATCH_PROGRESS (mailbox, mud);
398 398
399 } /* while */ 399 } /* while */
......
...@@ -112,6 +112,7 @@ mail/if.c ...@@ -112,6 +112,7 @@ mail/if.c
112 mail/inc.c 112 mail/inc.c
113 mail/mail.c 113 mail/mail.c
114 mail/mailline.c 114 mail/mailline.c
115 mail/mailvar.c
115 mail/msgset.y 116 mail/msgset.y
116 mail/next.c 117 mail/next.c
117 mail/previous.c 118 mail/previous.c
......