Re: An issue setting the header of a new message



On Wed, 2007-01-24 at 16:05 +0100, Sergio Villar Senin wrote:
> Hi all,
> 
> seems that tny_camel_msg_set_header_default changed a little bit
> recently. I've been experiencing some problems because now, this
> function replaces the mime part that comes with the TnyMsg if
> (((TnyCamelHeader *)header)->write).
> 
> The problem is the next, if you create a new mime part with the body of
> a message and then you create the header, when the new header is set,
> then the contents of the body are lost (because if you call any of the
> set_* functions like set_from then the value of write will be 1). Is
> there any place where the values of write are documented?


No, but the only possible vales are 0, 1, 2 and 3

0 Being that an mmap()ed CamelMessageInfo is used, 1 that a
CamelMimeMessage is used and 2 that a non-mmap()ed CamelMessageInfo is
used. 3 That the TnyHeader instance is dead and should have been cleared
or that it's not yet initialized.

In case of 1 and 2, the camel_message_info_* API must be used, in case
of 2 the camel_mime_part and camel_mime_message API must be used.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]