pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15546 )
Change subject: tdef: Introduce min_val and max_val fields ...................................................................... Patch Set 1: > Patch Set 1: Code-Review-1 > > (7 comments) > > All in all very nice. > > Please also add range tests to all of the *.vty transcript tests, see > tests/tdef/tdef_vty*, so that we can also verify the VTY behavior. > > BTW, in order to benefit from the range checks, all tdef users need to be > changed to use osmo_tdef_set() instead of osmo_tdef_get_entry()? Do you have > related patches? ... just realizing that this only needs to be done as soon > as an application actually sets min and max values, so that should be fine. > But this should be mentioned in the API doc of the new min and max members. Most tdef users actually set the values through VTY, and that one is already checking for ranges (done in this patch). I recently introduced osmo_tdef_set myself in osmo-pcu for timers whose values are coming from osmo-bts, so those are working already. I still need to check if there are other users os osmo_tdef setting tdef->val manually. But in any case it doesn't hurt because they don't have min_val or max_val set, so range check is not applied there. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15546 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4661ac41c29a009a1d5fc57d87aaee6041c7d1b2 Gerrit-Change-Number: 15546 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilira...@gmail.com> Gerrit-Reviewer: neels <nhofm...@sysmocom.de> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-CC: laforge <lafo...@gnumonks.org> Gerrit-Comment-Date: Wed, 18 Sep 2019 10:49:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment