Change in osmo-mgw[master]: adjust mgcp response context

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 https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Sep 15 10:02:19 UTC 2021


dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/25447 )

Change subject: adjust mgcp response context
......................................................................


Patch Set 5: Verified+1

(5 comments)

https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5//COMMIT_MSG 
Commit Message:

https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5//COMMIT_MSG@7 
PS5, Line 7: adjust mgcp response context
There is a policy: we must put the module name in front of the headline, like so:

mgcp_protocol: adjust mgcp response context


https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5/src/libosmo-mgcp/mgcp_protocol.c 
File src/libosmo-mgcp/mgcp_protocol.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5/src/libosmo-mgcp/mgcp_protocol.c@179 
PS5, Line 179: 	msg = msgb_alloc_c(ctx, 4096, "MGCP msg");
I think you should use msgb_alloc_headroom_c() here. The patch is not wrong, you do the msgb_reserve() below - msgb_alloc_headroom_c() would do that for you.


https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5/src/libosmo-mgcp/mgcp_protocol.c@182 
PS5, Line 182: 		LOGP(DLMGCP, LOGL_ERROR, "Failed to msgb for MGCP data.\n");
msgb_alloc_headroom_c/msgb_alloc_headroom_c already displays a log message - you can drop this log line now.


https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5/src/libosmo-mgcp/mgcp_protocol.c@244 
PS5, Line 244: static struct msgb *create_ok_resp_with_param(void *msgctx, struct mgcp_endpoint *endp, int code, const char *msg,
maybe you should keep the 80 column limit here. This is old code. In any case, the policy on this has never been thought to an end. If you think it looks better now, just keep it as it as it is.

(We should really make a cut and reformat all code in all repositories to 120 columns using scripts)


https://gerrit.osmocom.org/c/osmo-mgw/+/25447/5/src/libosmo-mgcp/mgcp_protocol.c@287 
PS5, Line 287: 	msgb_reserve(sdp, 128);
same as above, I would use msgb_alloc_headroom_c()



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/25447
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Id17f51d8bc0d1ba26f7fca72b1679ffadc9d6dc8
Gerrit-Change-Number: 25447
Gerrit-PatchSet: 5
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 15 Sep 2021 10:02:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210915/00589895/attachment.htm>


More information about the gerrit-log mailing list