diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-03-03 14:45:55 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-03-06 19:25:53 +0100 |
commit | adcdf150a63b3fe13dd933fca9f51974f40aeede (patch) | |
tree | f272f903d7b8fae6a0b0df3c9327d58cf456bac7 /src/tbf.h | |
parent | a41a71e2d4fd02a941dff5cc504c064f60c7e234 (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.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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]; }; |