summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-07-08 15:23:36 +0200
committerPablo Neira Ayuso2011-07-08 15:25:44 +0200
commit49bc872b48c7d57509dbc568f31deaede97c853c (patch)
tree41598273f97b5a3eca93eeda53001689a00ac0ba
parentipaccess: add bugtrag for the RSL link becomes up case (diff)
downloadlibosmo-abis-49bc872b48c7d57509dbc568f31deaede97c853c.tar.gz
libosmo-abis-49bc872b48c7d57509dbc568f31deaede97c853c.tar.xz
libosmo-abis-49bc872b48c7d57509dbc568f31deaede97c853c.zip
tests: close OML and RSL if set for the BSC example
We only close the OML and RSL links if they are indeed up.
-rw-r--r--tests/e1inp_ipa_bsc_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/e1inp_ipa_bsc_test.c b/tests/e1inp_ipa_bsc_test.c
index 3885dc9..4926228 100644
--- a/tests/e1inp_ipa_bsc_test.c
+++ b/tests/e1inp_ipa_bsc_test.c
@@ -62,8 +62,10 @@ sign_link_up(void *dev, struct e1inp_line *line, enum e1inp_sign_type type)
static void sign_link_down(struct e1inp_line *line)
{
LOGP(DBSCTEST, LOGL_NOTICE, "signal link has been closed\n");
- e1inp_sign_link_destroy(oml_sign_link);
- e1inp_sign_link_destroy(rsl_sign_link);
+ if (oml_sign_link)
+ e1inp_sign_link_destroy(oml_sign_link);
+ if (rsl_sign_link)
+ e1inp_sign_link_destroy(rsl_sign_link);
}
static void fill_om_hdr(struct abis_om_hdr *oh, uint8_t len)