bsc: Allow to disable sending ping/pong to the MSC
Some switches do not like to receive the IPA PING/PONG messages.
Allow to disable the handling with "no timeout-ping" and create
test cases that verify the switching between the modes. Change the
code to trat <= 0 as an invalid timeout.
Fixes: SYS#713
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index 5f2c1c5..e762cdd 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -346,7 +346,7 @@
static void msc_ping_timeout_cb(void *_data)
{
struct osmo_msc_data *data = (struct osmo_msc_data *) _data;
- if (data->ping_timeout < 0)
+ if (data->ping_timeout <= 0)
return;
send_ping(data);