On Thu, Jan 16, 2014 at 04:50:40PM +0100, Jacob Erlbeck wrote:
Good Morning!
+#define CONN_UNMODIFIED (0x1000)
+static void test_values(void) +{
- /* Check that NONE disables all output */
- OSMO_ASSERT((MGCP_CONN_NONE & MGCP_CONN_RECV_SEND) == 0)
- /* Check that LOOPBACK enables all output */
- OSMO_ASSERT((MGCP_CONN_LOOPBACK & MGCP_CONN_RECV_SEND) ==
MGCP_CONN_RECV_SEND)+}
I think osmo_static_assert would work here too? I am applying your patches as is though.
if (endp->conn_mode != -1)
if ((endp->conn_mode & CONN_UNMODIFIED) == 0) printf("Connection mode: %d, " "BTS output %sabled, NET output %sabled\n", endp->conn_mode,
In the next step we could change the test output to illustrate the tri-state from on/off and not modified to previous test?
endp->conn_mode = MGCP_CONN_NONE | CONN_UNMODIFIED;endp->net_end.output_enabled = 0;endp->bts_end.output_enabled = 0;
do we still need these flags? Or only because of the above printf?