if get_message_by_id can't find message, wait until new message is pushed before retrying

This commit is contained in:
Tomasz Moń
2009-05-06 13:19:49 +02:00
parent 4509c14bbc
commit 1a65deb8d5

View File

@@ -406,6 +406,10 @@ GString *get_message_by_id(MessageID id)
break;
}
}
if (found == FALSE)
g_cond_wait(message_queue_cond, message_queue_mutex);
g_mutex_unlock(message_queue_mutex);
} while (found == FALSE);