After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 518886 - More e-passwords.c cleanups
More e-passwords.c cleanups
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
2.22.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2008-02-26 17:32 UTC by Matthew Barnes
Modified: 2008-03-27 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (7.38 KB, patch)
2008-02-26 17:33 UTC, Matthew Barnes
committed Details | Review

Description Matthew Barnes 2008-02-26 17:32:33 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.
Comment 1 Matthew Barnes 2008-02-26 17:33:48 UTC
Created attachment 106004 [details] [review]
Proposed patch
Comment 2 Matthew Barnes 2008-03-11 01:01:51 UTC
Bumping version to a stable release.
Comment 3 Srinivasa Ragavan 2008-03-27 05:15:15 UTC
Milan, can you review this before 2.23.1
Comment 4 Milan Crha 2008-03-27 13:21:29 UTC
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.
Comment 5 Matthew Barnes 2008-03-27 15:01:09 UTC
Probably right.  I'll fix that before I commit.
Comment 6 Matthew Barnes 2008-03-27 17:15:54 UTC
Committed to trunk (revision 8595).