We should always terminate the string. No need to check outptr is in
2000-11-17 Not Zed <NotZed@HelixCode.com> * camel-stream-buffer.c (camel_stream_buffer_gets): We should always terminate the string. No need to check outptr is in range, its already been checked. * providers/local/camel-mbox-summary.c (mbox_summary_sync): When we update the summary, do it from mbox_summary->folder_size, not the content info endpos (which isn't any good anymore anyway). * providers/local/camel-mbox-folder.c (mbox_append_message): Set the frompos from the current folder size, since summary_add wont have initialised it to anything useful. svn path=/trunk/; revision=6597
This commit is contained in:
@ -1,3 +1,17 @@
|
||||
2000-11-17 Not Zed <NotZed@HelixCode.com>
|
||||
|
||||
* camel-stream-buffer.c (camel_stream_buffer_gets): We should
|
||||
always terminate the string. No need to check outptr is in range,
|
||||
its already been checked.
|
||||
|
||||
* providers/local/camel-mbox-summary.c (mbox_summary_sync): When
|
||||
we update the summary, do it from mbox_summary->folder_size, not
|
||||
the content info endpos (which isn't any good anymore anyway).
|
||||
|
||||
* providers/local/camel-mbox-folder.c (mbox_append_message): Set
|
||||
the frompos from the current folder size, since summary_add wont
|
||||
have initialised it to anything useful.
|
||||
|
||||
2000-11-16 Not Zed <NotZed@HelixCode.com>
|
||||
|
||||
* providers/local/camel-local-summary.c
|
||||
|
||||
@ -395,8 +395,7 @@ int camel_stream_buffer_gets(CamelStreamBuffer *sbf, char *buf, unsigned int max
|
||||
} while (bytes_read>0);
|
||||
|
||||
sbf->ptr = inptr;
|
||||
if (outptr <= outend)
|
||||
*outptr = 0;
|
||||
*outptr = 0;
|
||||
|
||||
return (int)(outptr - buf);
|
||||
}
|
||||
|
||||
@ -186,6 +186,9 @@ mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const Camel
|
||||
if (camel_exception_is_set(ex))
|
||||
goto fail;
|
||||
|
||||
/* and we need to set the frompos explicitly */
|
||||
((CamelMboxMessageInfo *)mi)->frompos = mbs->folder_size?mbs->folder_size+1:0;
|
||||
|
||||
d(printf("Appending message: uid is %s\n", mi->uid));
|
||||
|
||||
output_stream = camel_stream_fs_new_with_name(lf->folder_path, O_WRONLY|O_APPEND, 0600);
|
||||
|
||||
@ -587,13 +587,7 @@ mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInf
|
||||
char *fromline;
|
||||
|
||||
/* make sure we're in sync, after this point we at least have a complete list of id's */
|
||||
count = camel_folder_summary_count (s);
|
||||
if (count > 0) {
|
||||
CamelMessageInfo *mi = camel_folder_summary_index(s, count - 1);
|
||||
summary_update(mbs, mi->content->endpos, changeinfo, ex);
|
||||
} else {
|
||||
summary_update(mbs, 0, changeinfo, ex);
|
||||
}
|
||||
summary_update(mbs, mbs->folder_size, changeinfo, ex);
|
||||
|
||||
if (camel_exception_is_set(ex))
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user