From f38e879ca46b9dc8cb0efc11953a9a20222a046e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 26 Mar 2010 09:27:08 +0100 Subject: [PATCH] nat: Clear all pending messages in case the BSC disconnected Throw away all messages we have scheduled but never delivered to the BSC. --- openbsc/src/nat/bsc_nat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index ece58231b..309b6dbe3 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -481,6 +481,7 @@ static void remove_bsc_connection(struct bsc_connection *connection) struct sccp_connections *sccp_patch, *tmp; bsc_unregister_fd(&connection->write_queue.bfd); close(connection->write_queue.bfd.fd); + write_queue_clear(&connection->write_queue); llist_del(&connection->list_entry); /* stop the timeout timer */