summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-16 10:13:04 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-06-24 10:59:40 +0200
commitcc6b2d2fa30ad628833bf764caa8fdbac5aa1213 (patch)
tree8c68de07670633fbe550c9e1f97f985f767f9a22
parent1304b35a640fbe2308dd7af28dcad04cc052a0ef (diff)
ctrlif: Flush/Clear write_queue when closing the control socket
-rw-r--r--openbsc/src/libctrl/control_if.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c
index beb5b432a..b31f34fc6 100644
--- a/openbsc/src/libctrl/control_if.c
+++ b/openbsc/src/libctrl/control_if.c
@@ -256,6 +256,7 @@ err_index:
static void control_close_conn(struct ctrl_connection *ccon)
{
+ osmo_wqueue_clear(&ccon->write_queue);
close(ccon->write_queue.bfd.fd);
osmo_fd_unregister(&ccon->write_queue.bfd);
llist_del(&ccon->list_entry);