[XS] Change in osmo-mgw[master]: mgcp_msg: Improve logging checking MGCP line param
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39352?usp=email ) Change subject: mgcp_msg: Improve logging checking MGCP line param ...................................................................... mgcp_msg: Improve logging checking MGCP line param Change-Id: I18fd316a2d830b9418a806e32f27558d980259d6 --- M src/libosmo-mgcp/mgcp_msg.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/52/39352/1 diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 64156b9..3597e0c 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -178,8 +178,11 @@ mgcp_parse_hdr_pars_init(hp); for_each_line(line, pdata->save) { - if (!mgcp_check_param(line)) + if (!mgcp_check_param(line)) { + LOGP(DLMGCP, LOGL_NOTICE, "%s: wrong MGCP option format: '%s'\n", + pdata->epname, line); continue; + } switch (toupper(line[0])) { case 'L': @@ -251,10 +254,8 @@ bool mgcp_check_param(const char *line) { const size_t line_len = strlen(line); - if (line[0] != '\0' && line_len < 2) { - LOGP(DLMGCP, LOGL_NOTICE, "wrong MGCP option format: '%s'\n", line); + if (line[0] != '\0' && line_len < 2) return false; - } /* FIXME: A couple more checks wouldn't hurt... */ -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39352?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I18fd316a2d830b9418a806e32f27558d980259d6 Gerrit-Change-Number: 39352 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>
participants (1)
-
pespin