neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15214 )

Change subject: Replace own timer infra with libosmocore osmo_tdef
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

nice!

https://gerrit.osmocom.org/#/c/15214/1/src/gprs/gprs_gmm.c
File src/gprs/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15214/1/src/gprs/gprs_gmm.c@475
PS1, Line 475:  t = osmo_tdef_get(sgsn->cfg.T_defs, 3312, OSMO_TDEF_S, -1);
Hmm, I just notice a flaw in the osmo_tdef() API.

The val_if_not_present argument is an unsigned long, and I see -1 explicitly in 
the API docs, indicating that a negative value causes a program abort if no 
timer is found. That is in fact not possible with an unsigned long arg.

I created https://osmocom.org/issues/4152 for this.


https://gerrit.osmocom.org/#/c/15214/1/src/gprs/gprs_gmm_attach.c
File src/gprs/gprs_gmm_attach.c:

https://gerrit.osmocom.org/#/c/15214/1/src/gprs/gprs_gmm_attach.c@15
PS1, Line 15: static const struct osmo_tdef_state_timeout 
gmm_attach_fsm_timeouts[] = {
-1: you *have* to explicitly use an array size of [32] to be safe. See 
osmo_tdef_get_state_timeout() API doc.



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia0cf5f0a49737fbc419e2ccc86312d01c6e0056e
Gerrit-Change-Number: 15214
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-Comment-Date: Thu, 15 Aug 2019 00:18:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Reply via email to