Change in osmo-mgw[master]: mgcp_protocol: refactor MGCP request handling

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

pespin gerrit-no-reply at
Wed Jul 14 16:37:05 UTC 2021

pespin has posted comments on this change. ( )

Change subject: mgcp_protocol: refactor MGCP request handling

Patch Set 1:

File src/libosmo-mgcp/mgcp_msg.c: 
PS1, Line 186: 	pdata->trans = "000000";
why doing this? it could be that trans was parsed correctly? or we don't use it anyway? 
File src/libosmo-mgcp/mgcp_protocol.c: 
ERROR? that's expected depending on message type right? print this conditionally based on req.require_endp?

EDIT: I see this is already checked further below, so this shouldn't be here afaiu. 
PS1, Line 375: 		rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_GENERAL_RX_FAIL_NO_ENDPOINT));
Same, this is not necessarily a failure right? 
PS1, Line 386: 		rq.mgcp_cause = rc;
rc is always 0 here? 
PS1, Line 392: 		if (pdata.trans && rq.endp->last_trans && strcmp(rq.endp->last_trans, pdata.trans) == 0) {
so transactions without endpoint cannot be repeated? because they are under the "rq.endp" condition only. 
PS1, Line 400: 		if (strncmp(mgcp_requests[i].name,, 4) == 0) {
what about having "name" field be a char[4+1] and copy the first bytes of msgb in there? Looks more safe since you are also passing the pointer in several places and printing it and may be non-null terminated? 
PS1, Line 413: 				     "%s: executing request handler \"%s\" for endpoint resource \"%s\"\n",,
NOTICE here looks a level too high. INFO?

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I9f519d8a0ee8a513fa1e74acf3ee7dbc0991cdde
Gerrit-Change-Number: 24941
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at>
Gerrit-Comment-Date: Wed, 14 Jul 2021 16:37:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list