diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-04-19 20:18:53 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-04-19 20:18:53 +0200 |
commit | 9aa6d9496b4e0791c104ae711f0ccb7af7776e85 (patch) | |
tree | 2ba9400763a776366b3e4b2ab9052b9ab861d4eb /src/osmo-bts-sysmo/l1_if.c | |
parent | ff9e90492692228fad5cbd5044f4752dc7bec8b9 (diff) |
l1_if: allow for l1prim or sysprim without a completion callback
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index d344a1b3..c11c0cd9 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -765,7 +765,10 @@ int l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg) * sending the same primitive */ if (wlc->is_sys_prim == 0 && l1p->id == wlc->conf_prim_id) { llist_del(&wlc->list); - rc = wlc->cb(msg, wlc->cb_data); + if (wlc->cb) + rc = wlc->cb(msg, wlc->cb_data); + else + rc = 0; release_wlc(wlc); return rc; } @@ -790,7 +793,10 @@ int l1if_handle_sysprim(struct femtol1_hdl *fl1h, struct msgb *msg) * sending the same primitive */ if (wlc->is_sys_prim && sysp->id == wlc->conf_prim_id) { llist_del(&wlc->list); - rc = wlc->cb(msg, wlc->cb_data); + if (wlc->cb) + rc = wlc->cb(msg, wlc->cb_data); + else + rc = 0; release_wlc(wlc); return rc; } |