fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28793 )
Change subject: trxcon: send pending TRXC messages in trx_if_flush_ctrl() ......................................................................
trxcon: send pending TRXC messages in trx_if_flush_ctrl()
Send all queued TRXC messages immediately without waiting for response. This way we don't loose anything when an L1CTL connection gets lost.
Change-Id: I16d748b5194d381af0cd5ba9dbd4bfb33fc7d233 --- M src/host/trxcon/src/trx_if.c 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/93/28793/1
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 339173f..4b59cfd 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -759,8 +759,9 @@
/* Clear command queue */ while (!llist_empty(&trx->trx_ctrl_list)) { - tcm = llist_entry(trx->trx_ctrl_list.next, - struct trx_ctrl_msg, list); + tcm = llist_entry(trx->trx_ctrl_list.next, struct trx_ctrl_msg, list); + LOGPFSML(trx->fi, LOGL_NOTICE, "Sending control '%s'\n", tcm->cmd); + send(trx->trx_ofd_ctrl.fd, tcm->cmd, strlen(tcm->cmd) + 1, 0); llist_del(&tcm->list); talloc_free(tcm); }