Changeset 1046
- Timestamp:
- 06/09/06 06:16:50 (2 years ago)
- Files:
-
- 1 modified
-
branches/ipc-branch/opensync/opensync_queue.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ipc-branch/opensync/opensync_queue.c
r1045 r1046 78 78 * list since another thread might be duing the updates */ 79 79 g_mutex_lock(queue->pendingLock); 80 81 OSyncPendingMessage *found = NULL; 80 82 81 83 GList *p = NULL; … … 84 86 85 87 if (pending->id1 == message->id1 && pending->id2 == message->id2) { 86 87 /* Call the callback of the pending message */ 88 osync_assert(pending->callback); 89 pending->callback(message, pending->user_data); 90 91 /* Then remove the pending message and free it */ 88 89 /* Get the pending message from the queue */ 92 90 queue->pendingReplies = g_list_remove(queue->pendingReplies, pending); 93 g_free(pending);91 found = pending; 94 92 break; 95 93 } 96 94 } 97 98 95 g_mutex_unlock(queue->pendingLock); 96 97 if (found) { 98 /* Call the callback of the pending message and free the message */ 99 osync_assert(found->callback); 100 found->callback(message, found->user_data); 101 102 g_free(found); 103 } else 104 osync_trace(TRACE_INTERNAL, "%s: No pending message for %lld:%d", __func__, message->id1, message->id2); 105 99 106 } else 100 107 queue->message_handler(message, queue->user_data);
