aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-03 14:45:55 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-06 19:25:53 +0100
commitadcdf150a63b3fe13dd933fca9f51974f40aeede (patch)
treef272f903d7b8fae6a0b0df3c9327d58cf456bac7 /src/tbf.h
parenta41a71e2d4fd02a941dff5cc504c064f60c7e234 (diff)
tbf: Add name() method and put the buf into the tbf
Currently tbf_name() must not be used twice in a printf statement with different TBFs, since the same baffer will be used for each. This commit puts the text buffer into struct gprs_rlcmac_tbf to avoid this problem. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 1bea31d9..29959b95 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -117,6 +117,8 @@ struct gprs_rlcmac_tbf {
void set_state(enum gprs_rlcmac_tbf_state new_state);
const char *state_name() const;
+ const char *name() const;
+
struct msgb *create_dl_ass(uint32_t fn);
struct msgb *create_ul_ass(uint32_t fn);
@@ -226,6 +228,9 @@ protected:
int extract_tlli(const uint8_t *data, const size_t len);
static const char *tbf_state_name[6];
+
+private:
+ mutable char m_name_buf[60];
};