Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5551

to look at the new patch set (#2).

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(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/5551/2

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: newpatchset
Gerrit-Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to