Change in libosmocore[master]: gsm_utils: add function to get value strings for gsm48_chan_mode

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 Sep 25 15:32:14 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11078 )

Change subject: gsm_utils: add function to get value strings for gsm48_chan_mode
......................................................................

gsm_utils: add function to get value strings for gsm48_chan_mode

The enum gsm48_chan_mode has value strings, but no function to retrieve
those strings. Lets add one.

Change-Id: If715705e1ebdfcfdfae1c2099932f7bb8b3861a7
---
M include/osmocom/gsm/gsm_utils.h
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index 6ff4459..7eda5b9 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -228,6 +228,8 @@
 };
 
 extern const struct value_string gsm_chan_t_names[];
+static inline const char *gsm_chan_t_name(enum gsm48_chan_mode val)
+{ return get_value_string(gsm_chan_t_names, val); }
 
 /* Deprectated functions */
 /* Limit encoding and decoding to use no more than this amount of buffer bytes */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If715705e1ebdfcfdfae1c2099932f7bb8b3861a7
Gerrit-Change-Number: 11078
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180925/e9f0601f/attachment.htm>


More information about the gerrit-log mailing list