Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 23 13:15:55 UTC 2019


Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14131 )

Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
File openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c:

https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c@695
PS4, Line 695: 	if (sscanf(str + 9, "%u", &osmux_cid) != 1) {
I would suggest to use a variable, i.e. "x_osmux_len = strlen("X-Osmux: "); and then use it both in the strncasecmp avbove and here.  This should be optimized away by a good compiler, and it avoids either repeating oneself or magic numbers.  Or if you want to use "9", then at least have a #define somewhere



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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Thu, 23 May 2019 13:15:55 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190523/b4982723/attachment.html>


More information about the gerrit-log mailing list