diff options
author | Olivier Crête <olivier.crete@collabora.com> | 2021-07-20 13:06:58 -0400 |
---|---|---|
committer | Olivier Crête <olivier.crete@ocrete.ca> | 2021-07-20 22:46:37 +0000 |
commit | ca1e7d45d39db4dbcc99c6fe28df452bbf47ae14 (patch) | |
tree | dd0b5b1eeb82a177b247672419f9ee9b5678a63f | |
parent | 52268e7e8910d7432a3e9601a467528738936374 (diff) | |
download | libnice-ca1e7d45d39db4dbcc99c6fe28df452bbf47ae14.tar.gz |
agent: Simplify accepting state changes to FAILED
The component can go from any state to FAILED, so simplify
that and make it explicit.
-rw-r--r-- | agent/agent.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/agent/agent.c b/agent/agent.c index 261fe64..2549bac 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -2573,11 +2573,7 @@ void agent_signal_component_state_change (NiceAgent *agent, guint stream_id, gui g_assert (/* Can (almost) always transition to FAILED (including * DISCONNECTED → FAILED which happens if one component fails * before another leaves DISCONNECTED): */ - TRANSITION (DISCONNECTED, FAILED) || - TRANSITION (GATHERING, FAILED) || - TRANSITION (CONNECTING, FAILED) || - TRANSITION (CONNECTED, FAILED) || - TRANSITION (READY, FAILED) || + (new_state == NICE_COMPONENT_STATE_FAILED) || /* Standard progression towards a ready connection: */ TRANSITION (DISCONNECTED, GATHERING) || TRANSITION (GATHERING, CONNECTING) || |