osmo-pcu[master]: TBF: implement independent T31xx timers

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Dec 5 18:46:39 UTC 2017


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5158/2/src/tbf.h
File src/tbf.h:

Line 179: 	void stop_t3169(const char *reason);
I'm not the C++ expert here, but to me this looks a lot like copy+paste programming.  We fundamentally have an object "a timer" and we want to have multiple instances of this as static members of another object, right?  Can't we then simply have a timer class, and a static array of instances of that class, indexed by something like an enum for the T31... value? This way we would avoid having to copy+paste start and stop methods separately for every timer?

Once again, those are just my thoughts, I'm not the C++ person here.


-- 
To view, visit https://gerrit.osmocom.org/5158
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list