diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-07-08 15:23:36 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-07-08 15:25:44 +0200 |
commit | 49bc872b48c7d57509dbc568f31deaede97c853c (patch) | |
tree | 41598273f97b5a3eca93eeda53001689a00ac0ba /tests/e1inp_ipa_bsc_test.c | |
parent | db1c8a718b66f1a8f50221675b1fb537cf695021 (diff) |
tests: close OML and RSL if set for the BSC example
We only close the OML and RSL links if they are indeed up.
Diffstat (limited to 'tests/e1inp_ipa_bsc_test.c')
-rw-r--r-- | tests/e1inp_ipa_bsc_test.c | 6 |
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) |