forked from acouzens/open5gs
name changes
This commit is contained in:
parent
92fc35861f
commit
1e68d47927
|
@ -276,7 +276,7 @@ status_t mme_context_parse_config()
|
||||||
const char *s1ap_index_key =
|
const char *s1ap_index_key =
|
||||||
bson_iter_key(&s1ap_array);
|
bson_iter_key(&s1ap_array);
|
||||||
|
|
||||||
int domain = AF_UNSPEC;
|
int family = AF_UNSPEC;
|
||||||
const char *hostname = NULL;
|
const char *hostname = NULL;
|
||||||
c_uint16_t port = S1AP_SCTP_PORT;
|
c_uint16_t port = S1AP_SCTP_PORT;
|
||||||
mme_s1ap_t *s1ap = NULL;
|
mme_s1ap_t *s1ap = NULL;
|
||||||
|
@ -294,7 +294,7 @@ status_t mme_context_parse_config()
|
||||||
const char *s1ap_key =
|
const char *s1ap_key =
|
||||||
bson_iter_key(&s1ap_iter);
|
bson_iter_key(&s1ap_iter);
|
||||||
|
|
||||||
if (!strcmp(s1ap_key, "DOMAIN") &&
|
if (!strcmp(s1ap_key, "FAMILY") &&
|
||||||
BSON_ITER_HOLDS_UTF8(&s1ap_iter))
|
BSON_ITER_HOLDS_UTF8(&s1ap_iter))
|
||||||
{
|
{
|
||||||
const char *v =
|
const char *v =
|
||||||
|
@ -304,16 +304,16 @@ status_t mme_context_parse_config()
|
||||||
if (!strcmp(v, "AF_INET") ||
|
if (!strcmp(v, "AF_INET") ||
|
||||||
!strcmp(v, "PF_INET"))
|
!strcmp(v, "PF_INET"))
|
||||||
{
|
{
|
||||||
domain = AF_INET;
|
family = AF_INET;
|
||||||
}
|
}
|
||||||
else if (!strcmp(v, "AF_INET6") ||
|
else if (!strcmp(v, "AF_INET6") ||
|
||||||
!strcmp(v, "PF_INET6"))
|
!strcmp(v, "PF_INET6"))
|
||||||
{
|
{
|
||||||
domain = AF_INET6;
|
family = AF_INET6;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
d_warn("Unknown domain(%s)", v);
|
d_warn("Unknown family(%s)", v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ status_t mme_context_parse_config()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s1ap = mme_s1ap_add(domain, hostname, port);
|
s1ap = mme_s1ap_add(family, hostname, port);
|
||||||
d_assert(s1ap, return CORE_ERROR,);
|
d_assert(s1ap, return CORE_ERROR,);
|
||||||
|
|
||||||
} while(
|
} while(
|
||||||
|
@ -1014,7 +1014,7 @@ status_t mme_context_setup_trace_module()
|
||||||
}
|
}
|
||||||
|
|
||||||
mme_s1ap_t* mme_s1ap_add(
|
mme_s1ap_t* mme_s1ap_add(
|
||||||
int domain, const char *hostname, c_uint16_t port)
|
int family, const char *hostname, c_uint16_t port)
|
||||||
{
|
{
|
||||||
mme_s1ap_t *s1ap = NULL;
|
mme_s1ap_t *s1ap = NULL;
|
||||||
|
|
||||||
|
@ -1022,7 +1022,7 @@ mme_s1ap_t* mme_s1ap_add(
|
||||||
d_assert(s1ap, return NULL, "Null param");
|
d_assert(s1ap, return NULL, "Null param");
|
||||||
memset(s1ap, 0, sizeof(mme_s1ap_t));
|
memset(s1ap, 0, sizeof(mme_s1ap_t));
|
||||||
|
|
||||||
s1ap->domain = domain;
|
s1ap->family = family;
|
||||||
s1ap->hostname = hostname;
|
s1ap->hostname = hostname;
|
||||||
s1ap->port = port;
|
s1ap->port = port;
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ typedef struct _mme_context_t {
|
||||||
typedef struct _mme_s1ap_t {
|
typedef struct _mme_s1ap_t {
|
||||||
lnode_t node; /* A node of list_t */
|
lnode_t node; /* A node of list_t */
|
||||||
|
|
||||||
int domain;
|
int family;
|
||||||
const char *hostname;
|
const char *hostname;
|
||||||
c_uint16_t port;
|
c_uint16_t port;
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ CORE_DECLARE(status_t) mme_context_parse_config(void);
|
||||||
CORE_DECLARE(status_t) mme_context_setup_trace_module(void);
|
CORE_DECLARE(status_t) mme_context_setup_trace_module(void);
|
||||||
|
|
||||||
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_add(
|
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_add(
|
||||||
int domain, const char *hostname, c_uint16_t port);
|
int family, const char *hostname, c_uint16_t port);
|
||||||
CORE_DECLARE(status_t) mme_s1ap_remove(mme_s1ap_t *s1ap);
|
CORE_DECLARE(status_t) mme_s1ap_remove(mme_s1ap_t *s1ap);
|
||||||
CORE_DECLARE(status_t) mme_s1ap_remove_all(void);
|
CORE_DECLARE(status_t) mme_s1ap_remove_all(void);
|
||||||
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_first(void);
|
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_first(void);
|
||||||
|
|
|
@ -24,12 +24,12 @@ status_t s1ap_open(void)
|
||||||
|
|
||||||
for (s1ap = mme_s1ap_first(); s1ap; s1ap = mme_s1ap_next(s1ap))
|
for (s1ap = mme_s1ap_first(); s1ap; s1ap = mme_s1ap_next(s1ap))
|
||||||
{
|
{
|
||||||
rv = s1ap_server(&s1ap->sock, s1ap->domain, type,
|
rv = s1ap_server(&s1ap->sock, s1ap->family, type,
|
||||||
s1ap->hostname, s1ap->port);
|
s1ap->hostname, s1ap->port);
|
||||||
if (rv != CORE_OK)
|
if (rv != CORE_OK)
|
||||||
{
|
{
|
||||||
d_error("s1ap_server(%d:%d:[%s]:%d) failed",
|
d_error("s1ap_server %d:%d:[%s]:%d failed",
|
||||||
s1ap->domain, type, s1ap->hostname, s1ap->port);
|
s1ap->family, type, s1ap->hostname, s1ap->port);
|
||||||
return CORE_ERROR;
|
return CORE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue