[PATCH 6/9] mgcp: Set output_enabled flags based on the MGCP mode

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Wed Jan 8 12:06:56 UTC 2014


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






More information about the OpenBSC mailing list