On Wed, Jan 08, 2014 at 01:06:56PM +0100, Jacob Erlbeck wrote:
Good Morning!
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.
That is a valid argument. On the other hand the further we go away from the normal allocation/init procedure of an endpoint the more we test something that does not relate to the real world.
What other state do we rely on besides the CI?
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.
That is true. I have a local refactoring backlog to make mgcp_free_endp free some resources and have a separate mgcp_init_endp to initialize it just after the allocation. :}