bug-mailutils
[Top][All Lists]
Advanced

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

[bug-mailutils] Couple working issues about mailutils


From: Kostik
Subject: [bug-mailutils] Couple working issues about mailutils
Date: Mon, 12 Apr 2010 14:08:20 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0

Hi!

1. I have a file NOT in msg format. It has a few extra lines before
headers. I have to skip these lines and open it as message.

Now I'm doing so:
- create stream from my dirty file: mu_file_stream_create()
- open this stream: mu_stream_open()
- do do-while loop and skip extra lines via:
mu_stream_sequential_readline(), search cut-line and break.
- create memory empty stream: mu_memory_stream_create()
- poured from the file-stream into the inmemory-stream without extra lines:
 while with mu_stream_sequential_read() and mu_stream_sequential_write()
- close and destroy file stream: mu_stream_close() and mu_stream_destroy
- create empty msg: mu_message_create()
- create msg from inmemory-stream (which has no extra lines and in msg
forman now): mu_message_set_stream()
- and work with message from inmemory-stream.

My question is: is this the correct way to solve the issue or is there
another more simple way to skip extra lines?

2. I think that in my application has memory leak. After I finished working
with message opened from inmemory-stream, I'm doing close and destroy
inmemory-stream: mu_stream_close() and mu_stream_destroy(). Is this correct?

=kostik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]