Camel Session thread functions disabled in Tinymail?



(Congratulations on 1.0.0, by the way!)

I'm working in Modest, trying to turn on camel's functionality for keeping IMAP folders synchronised. I've bumped up against this function:

static void *
tny_session_camel_ms_thread_msg_new (CamelSession *session, CamelSessionThreadOps *ops, unsigned int size)
{
CamelSessionThreadMsg *msg = ms_parent_class->thread_msg_new(session, ops, size);

	msg->ops = g_new0 (CamelSessionThreadOps,1);
	msg->ops->free = my_free_func;
	msg->ops->receive = my_receive_func;
	msg->data = NULL;
	msg->op = camel_operation_new (my_cancel_func, NULL);

	return msg;

}

In Camel Disco, the function cdf_folder_changed gets called when new messages turn up in the folder. This tries to set up a thread to run cdf_sync_offline to synchronise the mails. It passes this function inside a CamelSessionThreadOps object to camel_session_thread_msg_new, which calls tny_session_camel_ms_thread_msg.

So it calls thread_msg_new which calls session_thread_msg_new which sets up the msg correctly. But as you can see, it overwrites the ops member with its own CamelSessionThreadOps object, pointing to empty functions my_free_func and my_receive_func. So the supplied functions never get called. This seems odd.

I commented out all those msg->* lines and folder synchronisation seems to work. So I'm wondering if there's some reason for that stuff being there, and if I'm breaking anything with this?



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