Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12988 )

Change subject: log: fsm: fix logging of negative T upon timeout
......................................................................


Patch Set 1:

I understand; what if we choose a different representation that would allow me 
to use the negative T space without confusion?

some ideas:

 "Timeout of -T1"
 "Timeout of T-OSMO-1"
 "Timeout of X1"

In the code, there can hardly be confusion, since "if (T == -1)" is obviously 
not "if (T == 1)", so this is completely about the user experience; (log, vty)

The point is that there are a lot of places where I am not sure which timer is 
the correct one, or where there simply is none defined. Instead of having to 
search all specs to make sure I don't accidentally use an already designated 
number, and instead of inventing stupid numbers like 993210 or 1000001, I find 
it very tempting to use the negative T space.

Related: I am writing all of my FSM instances with struct 
osmo_tdef_state_timeout arrays now, and use distinct T numbers for all states 
that need a timeout, so I need to pick a lot of T numbers. Just picking -1, -2, 
-3,... requires the least imagination and research at this time, and gives a 
warm feeling of never interfering with 3GPP numbers.

I'd then change this logging and the osmo_tdef_vty to the alternate 
representation, like '# timer X3 default' vs. '# timer T3 default';  prohibit 
'# timer T-3'.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a59457623da9309fbbda235fe18fadd1636bff6
Gerrit-Change-Number: 12988
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>
Gerrit-CC: Harald Welte <[email protected]>
Gerrit-Comment-Date: Mon, 25 Feb 2019 02:19:58 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No

Reply via email to