summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/l1ctl_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/trxcon/l1ctl_link.c')
-rw-r--r--src/host/trxcon/l1ctl_link.c8
1 files changed, 8 insertions, 0 deletions
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 @@ int l1ctl_link_init(struct l1ctl_link **l1l, const char *sock_path)
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 @@ void l1ctl_link_shutdown(struct l1ctl_link *l1l)
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 */