Change in osmo-mgw[master]: mgcp_protocol: refactor function create_response_with_sdp

dexter gerrit-no-reply at
Wed Jul 21 08:31:48 UTC 2021

dexter has posted comments on this change. ( )

Change subject: mgcp_protocol: refactor function create_response_with_sdp

Patch Set 1:

Commit Message: 
PS1, Line 7: mgcp_protocol: rafctor function create_response_with_sdp
> refactor?
PS1, Line 9: The function create_response_calls add_params, which is rather short.
> I think you got the underscores incorrectly.
File src/libosmo-mgcp/mgcp_protocol.c: 
PS1, Line 1083: 	bool add_epname = rq->wildcarded && endp->trunk->trunk_type == MGCP_TRUNK_VIRTUAL;
> IIUC if wildcarded then endp should be null? so simply check for null endp in create_response_with_s […]
This is not the case for CRCX. endp can never be NULL here but we can access the trunk pointer directly. This would be better anyway. 
PS1, Line 1332: 	return create_response_with_sdp(endp, conn, "MDCX", pdata->trans, false, false);
> why not adding the conn here?
I think this is because the conn id is already known. A MDCX always addresses a specific connection, so it is not necessary to have the conn id in the response as well. I don't know if the spec explicitly forbids this, but it would be odd.

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7e29c513f4386832646e96194ed6c2397405ed3b
Gerrit-Change-Number: 24972
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at>
Gerrit-Comment-Date: Wed, 21 Jul 2021 08:31:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list