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.orgHarald Welte has submitted this change and it was merged.
Change subject: control_if: Log the disconnect of a CTRL client
......................................................................
control_if: Log the disconnect of a CTRL client
We are logging new CTRL connections at LOGL_INFO, so we should
also log disconnects for symmetry.
Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba
---
M src/ctrl/control_if.c
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 6293ff5..a4382fa 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -168,6 +168,10 @@
static void control_close_conn(struct ctrl_connection *ccon)
{
struct ctrl_cmd_def *cd, *cd2;
+ char *name = osmo_sock_get_name(ccon, ccon->write_queue.bfd.fd);
+
+ LOGP(DLCTRL, LOGL_INFO, "close()d CTRL connection %s\n", name);
+ talloc_free(name);
osmo_wqueue_clear(&ccon->write_queue);
close(ccon->write_queue.bfd.fd);
@@ -340,7 +344,6 @@
return 0;
/* msg was already discarded. */
if (ret == 0) {
- LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n");
control_close_conn(ccon);
ret = -EIO;
}
--
To view, visit https://gerrit.osmocom.org/5551
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder