On 08.01.2014 10:45, Holger Hans Peter Freyther wrote:
On Tue, Jan 07, 2014 at 12:07:48PM +0100, Jacob
Erlbeck wrote:
Good Morning,
diff --git a/openbsc/tests/mgcp/mgcp_test.ok
b/openbsc/tests/mgcp/mgcp_test.ok
index 43a7402..6db7226 100644
--- a/openbsc/tests/mgcp/mgcp_test.ok
+++ b/openbsc/tests/mgcp/mgcp_test.ok
In the test case you force the output_enabled variable to 0. Now that
the state is set based on the connection mode I think it is dangerous
to set the state inside the testcase. mgcp_free_endpoint should reset
it and we should rely and test that.
What do you think?
We cannot use mgcp_free_endp() there without additional changes in the
testing framework, since this would clear flags like ci too, thus
breaking e.g. MDCX handling. The order of the test messages is relevant
and part of the state must be kept.
In addition, mgcp_free_endp() initialises the output_enabled flags to 1
which would make it difficult to check whether sendrecv has been
detected successfully. Of course this raises the question, whether it in
sensible to set them to 1 at initialisation. While it maintains semantic
compatibility, these flags are not in sync with conn_mode after init.
Jacob