From: <dg...@su...> - 2009-01-22 22:27:32
|
Author: Graham Cobb Date: Thu Jan 22 23:01:49 2009 New Revision: 5220 URL: http://www.opensync.org/changeset/5220 Log: timeout: fix crash found running engine unit tests Modified: branches/timeout/ChangeLog branches/timeout/opensync/ipc/opensync_queue.c Modified: branches/timeout/ChangeLog ============================================================================== --- branches/timeout/ChangeLog Thu Jan 22 22:09:35 2009 (r5219) +++ branches/timeout/ChangeLog Thu Jan 22 23:01:49 2009 (r5220) @@ -3,6 +3,7 @@ * opensync/ipc/opensync_queue.c (_timeout_dispatch): Restart timeout search at start of pending list as list may have been modified while unlocked. (_timeout_dispatch): Set message id in error message + (_timeout_dispatch): Undo change to restart timeout search (above) 2009-01-21 Graham Cobb <g+...@co...> Modified: branches/timeout/opensync/ipc/opensync_queue.c ============================================================================== --- branches/timeout/opensync/ipc/opensync_queue.c Thu Jan 22 22:09:35 2009 (r5219) +++ branches/timeout/opensync/ipc/opensync_queue.c Thu Jan 22 23:01:49 2009 (r5220) @@ -142,8 +142,10 @@ /* Lock again, to keep the iteration of the pendingReplies list atomic. */ g_mutex_lock(queue->pendingLock); - /* Restart search as list may have been modified while it was unlocked */ - p = queue->pendingReplies; + /* The queue may have been modified while it was unlocked so don't go + looking for any more entries. If there are more, they will be found + on the next call */ + break; } } |