Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/9972


Change subject: ctrl: Log CMD TYPE on invalid ID number
......................................................................

ctrl: Log CMD TYPE on invalid ID number

Change-Id: Ia890d4b841ef02342cc1cf7f5926866b040dc8ab
---
M src/ctrl/control_cmd.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/9972/1

diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index bff4d17..c5924b2 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -363,10 +363,11 @@
        }

        if (!id_str_valid(tmp)) {
+               LOGP(DLCTRL, LOGL_NOTICE, "Invalid %s message ID number: 
\"%s\"\n",
+                    get_value_string(ctrl_type_vals, cmd->type), 
osmo_escape_str(tmp, -1));
                cmd->type = CTRL_TYPE_ERROR;
                cmd->id = "err";
                cmd->reply = "Invalid message ID number";
-               LOGP(DLCTRL, LOGL_NOTICE, "Invalid message ID number: 
\"%s\"\n", osmo_escape_str(tmp, -1));
                goto err;
        }
        cmd->id = talloc_strdup(cmd, tmp);

--
To view, visit https://gerrit.osmocom.org/9972
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia890d4b841ef02342cc1cf7f5926866b040dc8ab
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to