Change in osmo-sip-connector[master]: Support Emergency Calling

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/.

Max gerrit-no-reply at lists.osmocom.org
Mon Jan 28 10:58:33 UTC 2019


Max has posted comments on this change. ( https://gerrit.osmocom.org/12682 )

Change subject: Support Emergency Calling
......................................................................


Patch Set 6: Code-Review-1

(2 comments)

It kinda feels like you're "cheating" compiler in here to keep the 'const' in place. Sure, you can outsmart compiler but I don't think you should. The 'const' is just an indicator for you (and any other person reading the code) to make it easier to understand what the code touches. Compiler is trying its best to check this expectation at compile-time - this check isn't perfect and we shouldn't make it even harder.

If you change some data - just drop the 'const' from corresponding pointer, even if compiler fails to warn you about it.

Especially in this case where all the check_*() functions are called on buffer local to the mncc_data(), which isn't used after it's checked by single check_() function.

https://gerrit.osmocom.org/#/c/12682/6/src/mncc.c
File src/mncc.c:

https://gerrit.osmocom.org/#/c/12682/6/src/mncc.c@418
PS6, Line 418: 	uint32_t fields;
Erm, why?


https://gerrit.osmocom.org/#/c/12682/6/src/mncc.c@440
PS6, Line 440: 	if ((fields & MNCC_F_CALLING) == 0) {
I'd rather avoid changing this.



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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d0adb61dfa82e7ded5f41d9bc773d546112c9f1
Gerrit-Change-Number: 12682
Gerrit-PatchSet: 6
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Mon, 28 Jan 2019 10:58:33 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190128/507d8d3b/attachment.htm>


More information about the gerrit-log mailing list