Re: question about tny_camel_folder_add_msg_async_default



On Thu, 2008-01-10 at 17:48 +0100, Sergio Villar Senin wrote:
> Dirk-Jan Binnema nokia com wrote:
> 

> > ...
      
> >  so, we're calling our callback function with a AddMsgFolderInfo
> > structure, but
> >  the callback is expecting to get its SaveToDraftsAddMsgInfo. It will
> > also do a 
> >  g_slice_free etc., so it's easy to see how this could lead to crashes.
> 
> Not really, this item->callback is not the user callback, is the
> callback that is set when calling tny_camel_queue_launch, that is, the
> callback that the camel queue will call once the asynchronous operation
> is finished.

Right

> In the case you mention add_msg_async the callback that it's called is
> tny_camel_folder_add_msg_async_callback. This callback "unpacks" the
> AddMsgFolderInfo and finally calls the user callback with the user data.

Right

Nothing more to add for me, Sergio has it right :)

(so Tinymail aint freeing your user data, don't worry -- that would also
have led to a massive amount of crashes earlier of course --)


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






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