use new OSMO_VALUE_STRING
libosmocore change-id I857af45ae602bb9a647ba26cf8b0d1b23403b54c adds OSMO_VALUE_STRING to compose value_string arrays with the exact enum names as entries. Use instead of identical local macros in two places. Change-Id: I1b44d2a3f293785a01d6a587c78f9e0cbeec70c3
This commit is contained in:
parent
9fdb4e5f2f
commit
b42dc43e28
|
@ -30,6 +30,7 @@
|
||||||
#include <osmocom/core/talloc.h>
|
#include <osmocom/core/talloc.h>
|
||||||
#include <osmocom/core/logging.h>
|
#include <osmocom/core/logging.h>
|
||||||
#include <osmocom/core/application.h>
|
#include <osmocom/core/application.h>
|
||||||
|
#include <osmocom/core/utils.h>
|
||||||
#include <osmocom/vty/logging.h>
|
#include <osmocom/vty/logging.h>
|
||||||
|
|
||||||
#include <osmocom/gsm/gsm48.h>
|
#include <osmocom/gsm/gsm48.h>
|
||||||
|
@ -89,12 +90,10 @@ static LLIST_HEAD(ue_conn_ctx_list);
|
||||||
static LLIST_HEAD(rnc_list);
|
static LLIST_HEAD(rnc_list);
|
||||||
|
|
||||||
const struct value_string iu_event_type_names[] = {
|
const struct value_string iu_event_type_names[] = {
|
||||||
#define IU_EVT_STR(X) { X, #X }
|
OSMO_VALUE_STRING(IU_EVENT_RAB_ASSIGN),
|
||||||
IU_EVT_STR(IU_EVENT_RAB_ASSIGN),
|
OSMO_VALUE_STRING(IU_EVENT_SECURITY_MODE_COMPLETE),
|
||||||
IU_EVT_STR(IU_EVENT_SECURITY_MODE_COMPLETE),
|
OSMO_VALUE_STRING(IU_EVENT_IU_RELEASE),
|
||||||
IU_EVT_STR(IU_EVENT_IU_RELEASE),
|
OSMO_VALUE_STRING(IU_EVENT_LINK_INVALIDATED),
|
||||||
IU_EVT_STR(IU_EVENT_LINK_INVALIDATED),
|
|
||||||
#undef IU_EVT_STR
|
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,19 +26,18 @@
|
||||||
#include <openbsc/gsm_data.h>
|
#include <openbsc/gsm_data.h>
|
||||||
|
|
||||||
#include <osmocom/gsm/comp128.h>
|
#include <osmocom/gsm/comp128.h>
|
||||||
|
#include <osmocom/core/utils.h>
|
||||||
|
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
const struct value_string auth_action_names[] = {
|
const struct value_string auth_action_names[] = {
|
||||||
#define AUTH_ACTION_STR(X) { X, #X }
|
OSMO_VALUE_STRING(AUTH_ERROR),
|
||||||
AUTH_ACTION_STR(AUTH_ERROR),
|
OSMO_VALUE_STRING(AUTH_NOT_AVAIL),
|
||||||
AUTH_ACTION_STR(AUTH_NOT_AVAIL),
|
OSMO_VALUE_STRING(AUTH_DO_AUTH_THEN_CIPH),
|
||||||
AUTH_ACTION_STR(AUTH_DO_AUTH_THEN_CIPH),
|
OSMO_VALUE_STRING(AUTH_DO_CIPH),
|
||||||
AUTH_ACTION_STR(AUTH_DO_CIPH),
|
OSMO_VALUE_STRING(AUTH_DO_AUTH),
|
||||||
AUTH_ACTION_STR(AUTH_DO_AUTH),
|
|
||||||
#undef AUTH_ACTION_STR
|
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue