Change in osmo-mgw[master]: mgcp_client: fix error handling in mgcp message generation

dexter gerrit-no-reply at
Fri Jun 11 13:17:10 UTC 2021

dexter has posted comments on this change. ( )

Change subject: mgcp_client: fix error handling in mgcp message generation

Patch Set 4:

(1 comment) 
File src/libosmo-mgcp-client/mgcp_client.c: 
PS3, Line 1352: rc_lco == -2
> you can simply return -ENOBUFS or some other errno value, whcih are guaranteed to be different from  […]
I have fixed now. The code now uses proper return codes. I think it makes also sense to exit early when an error in the data is discovered. Continuing would be pointless. I guess when I wrote this I wanted to have a single location where the error message is printed. Now there are two more, but this also allows to narrow down the problem a bit more - if there is one.

What I find also find problematic (came to my mind while reading Pau's comment). The rc of msgb_printf is currently added up. This is probably not so good since it may then evidently become a different return code if more then one msgb_printf failes. I have fixed that also.

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibb788343e0bec9c0eaf33e6e4727d4d36c100017
Gerrit-Change-Number: 24182
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-Comment-Date: Fri, 11 Jun 2021 13:17:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge at>
Comment-In-Reply-To: pespin <pespin at>
Comment-In-Reply-To: fixeria <vyanitskiy at>
Comment-In-Reply-To: dexter <pmaier at>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list