[Pkg-telepathy-commits] [libnice] 145/265: agent: Assert on re-entrant reads
Simon McVittie
smcv at debian.org
Wed May 14 12:05:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository libnice.
commit 816bf91a923a846066ce83b8bbf4af7ee12068d6
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date: Fri Jan 31 11:43:19 2014 +0000
agent: Assert on re-entrant reads
Ensure the agent’s context doesn’t get iterated while in the middle of
reading a message, as that will corrupt the component->recv_messages
state.
---
agent/agent.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/agent/agent.c b/agent/agent.c
index 285e3b7..2a0e429 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -3127,6 +3127,10 @@ nice_agent_recv_messages_blocking_or_nonblocking (NiceAgent *agent,
blocking ? "blocking" : "non-blocking");
nice_debug_input_message_composition (messages, n_messages);
+ /* Disallow re-entrant reads. */
+ g_assert (component->n_recv_messages == 0 &&
+ component->recv_messages == NULL);
+
/* Set the component’s receive buffer. */
context = component_dup_io_context (component);
component_set_io_callback (component, NULL, NULL, messages, n_messages,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git
More information about the Pkg-telepathy-commits
mailing list