This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/6744 host/trxcon/l1ctl.c: reset FBSB expire timer on shutdown Change-Id: If3c8a34f0c1105c6acbfe4f9233482a31f6558de --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M src/host/trxcon/l1ctl_link.c M src/host/trxcon/l1ctl_link.h 4 files changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/44/6744/1 diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 2c82e11..f71807a 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -685,3 +685,10 @@ return -EINVAL; } } + +void l1ctl_shutdown_cb(struct l1ctl_link *l1l) +{ + /* Abort FBSB expire timer */ + if (osmo_timer_pending(&l1l->fbsb_timer)) + osmo_timer_del(&l1l->fbsb_timer); +} diff --git a/src/host/trxcon/l1ctl.h b/src/host/trxcon/l1ctl.h index 6c61bfd..e83138d 100644 --- a/src/host/trxcon/l1ctl.h +++ b/src/host/trxcon/l1ctl.h @@ -6,6 +6,10 @@ #include "l1ctl_link.h" #include "l1ctl_proto.h" +/* Event handlers */ +int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg); +void l1ctl_shutdown_cb(struct l1ctl_link *l1l); + int l1ctl_tx_fbsb_conf(struct l1ctl_link *l1l, uint8_t result, struct l1ctl_info_dl *dl_info, uint8_t bsic); int l1ctl_tx_ccch_mode_conf(struct l1ctl_link *l1l, uint8_t mode); @@ -13,7 +17,6 @@ int dbm, int last); int l1ctl_tx_reset_conf(struct l1ctl_link *l1l, uint8_t type); int l1ctl_tx_reset_ind(struct l1ctl_link *l1l, uint8_t type); -int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg); int l1ctl_tx_data_ind(struct l1ctl_link *l1l, struct l1ctl_info_dl *ind); int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, uint32_t fn); diff --git a/src/host/trxcon/l1ctl_link.c b/src/host/trxcon/l1ctl_link.c index dfcbecb..265bfeb 100644 --- a/src/host/trxcon/l1ctl_link.c +++ b/src/host/trxcon/l1ctl_link.c @@ -251,6 +251,10 @@ return rc; } + /* Bind shutdown handler */ + l1l_new->shutdown_cb = l1ctl_shutdown_cb; + + /* Bind connection handler */ bfd->cb = l1ctl_link_accept; bfd->when = BSC_FD_READ; bfd->data = l1l_new; @@ -281,6 +285,10 @@ LOGP(DL1C, LOGL_NOTICE, "Shutdown L1CTL link\n"); + /* Call shutdown callback */ + if (l1l->shutdown_cb != NULL) + l1l->shutdown_cb(l1l); + listen_bfd = &l1l->listen_bfd; /* Check if we have an established connection */ diff --git a/src/host/trxcon/l1ctl_link.h b/src/host/trxcon/l1ctl_link.h index f20af93..f9d91f1 100644 --- a/src/host/trxcon/l1ctl_link.h +++ b/src/host/trxcon/l1ctl_link.h @@ -28,6 +28,9 @@ /* L1CTL handlers specific */ struct osmo_timer_list fbsb_timer; uint8_t fbsb_conf_sent; + + /* Shutdown callback */ + void (*shutdown_cb)(struct l1ctl_link *l1l); }; int l1ctl_link_init(struct l1ctl_link **l1l, const char *sock_path); -- To view, visit https://gerrit.osmocom.org/6744 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3c8a34f0c1105c6acbfe4f9233482a31f6558de Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org>