GNOME Bugzilla – Bug 518886
More e-passwords.c cleanups
Last modified: 2008-03-27 17:15:54 UTC
Another attempt to clean up the e-passwords.c code a bit. 1) First and foremost, e-passwords.c holds the last use of an EMsgPort outside of Camel. It's used to communicate to a waiting thread when an EPassMsg has been processed. EFlag is a better fit here. 2) Use a GQueue for the message queue instead of an EDList. Note the new logic in pass_response(). It tags nodes for deletion while iterating over the GQueue, and then "expunges" the GQueue. 3) Use GStaticMutex instead of pthread_mutex_t. 4) Use GThread instead of pthread_t. Obviously this should wait until 2.23 development opens up.
Created attachment 106004 [details] [review] Proposed patch
Bumping version to a stable release.
Milan, can you review this before 2.23.1
I just wonder whether the g_queue_peek_head is better than accessing struct members. I know I/we do this with GList/GSList structures every day, so just a thought. Nonetheless, the patch looks fine from my point of view. Commit to trunk.
Probably right. I'll fix that before I commit.
Committed to trunk (revision 8595).