update it
This commit is contained in:
parent
811ec1b43d
commit
29f105a036
|
@ -24,10 +24,10 @@ typedef struct _gtp_node_t {
|
|||
c_uint32_t addr; /**< Network byte order IP Address */
|
||||
c_uint16_t port; /**< Host byte order Port number */
|
||||
|
||||
/**< List of local initiated transactions */
|
||||
list_t local_xlist;
|
||||
/**< List of Remote initiated transactions */
|
||||
list_t remote_xlist;
|
||||
list_t initial_list;
|
||||
list_t triggered_list;
|
||||
list_t *local_list;
|
||||
list_t *remote_list;
|
||||
} gtp_node_t;
|
||||
|
||||
CORE_DECLARE(status_t) gtp_listen(net_sock_t **sock,
|
||||
|
@ -35,7 +35,6 @@ CORE_DECLARE(status_t) gtp_listen(net_sock_t **sock,
|
|||
CORE_DECLARE(status_t) gtp_close(net_sock_t *sock);
|
||||
|
||||
CORE_DECLARE(pkbuf_t *) gtp_read(net_sock_t *sock);
|
||||
|
||||
CORE_DECLARE(status_t) gtp_send(net_sock_t *sock,
|
||||
gtp_node_t *gnode, pkbuf_t *pkbuf);
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ static gtp_xact_t *gtp_xact_new_internal(gtp_xact_ctx_t *context,
|
|||
xact->retry_count = context->retry_count;
|
||||
|
||||
list_append(xact->org == GTP_LOCAL_ORIGINATOR ?
|
||||
&xact->gnode->local_xlist : &xact->gnode->remote_xlist, xact);
|
||||
xact->gnode->local_list : xact->gnode->remote_list, xact);
|
||||
|
||||
return xact;
|
||||
|
||||
|
@ -152,8 +152,8 @@ status_t gtp_xact_delete(gtp_xact_t *xact)
|
|||
d_assert(xact->tm_wait, , "Null param");
|
||||
tm_delete(xact->tm_wait);
|
||||
|
||||
list_remove(xact->org == GTP_LOCAL_ORIGINATOR ? &xact->gnode->local_xlist :
|
||||
&xact->gnode->remote_xlist, xact);
|
||||
list_remove(xact->org == GTP_LOCAL_ORIGINATOR ? xact->gnode->local_list :
|
||||
xact->gnode->remote_list, xact);
|
||||
pool_free_node(>p_xact_pool, xact);
|
||||
|
||||
return CORE_OK;
|
||||
|
@ -267,7 +267,7 @@ gtp_xact_t *gtp_xact_find(gtp_node_t *gnode, pkbuf_t *pkbuf)
|
|||
case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE:
|
||||
case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE:
|
||||
case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE:
|
||||
xact = list_first(&gnode->local_xlist);
|
||||
xact = list_first(&gnode->initial_list);
|
||||
break;
|
||||
|
||||
case GTP_CREATE_SESSION_RESPONSE_TYPE:
|
||||
|
@ -279,7 +279,7 @@ gtp_xact_t *gtp_xact_find(gtp_node_t *gnode, pkbuf_t *pkbuf)
|
|||
case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE:
|
||||
case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE:
|
||||
case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE:
|
||||
xact = list_first(&gnode->remote_xlist);
|
||||
xact = list_first(&gnode->triggered_list);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -120,6 +120,11 @@ sgw_ctx_t* mme_ctx_sgw_add()
|
|||
|
||||
memset(sgw, 0, sizeof(sgw_ctx_t));
|
||||
|
||||
list_init(&sgw->gnode.initial_list);
|
||||
list_init(&sgw->gnode.triggered_list);
|
||||
sgw->gnode.local_list = &sgw->gnode.initial_list;
|
||||
sgw->gnode.remote_list = &sgw->gnode.triggered_list;
|
||||
|
||||
list_append(&sgw_list, sgw);
|
||||
|
||||
return sgw;
|
||||
|
|
|
@ -50,7 +50,7 @@ void *THREAD_FUNC mme_sm_main(thread_id id, void *data)
|
|||
"MME event queue creation failed");
|
||||
tm_service_init(&mme_self()->tm_service);
|
||||
gtp_xact_init(&mme_self()->gtp_xact_ctx, &mme_self()->tm_service,
|
||||
5, 3000, 3);
|
||||
EVT_TM_MME_S11_T3, 3000, 3);
|
||||
|
||||
fsm_create(&mme_sm.fsm, mme_state_initial, mme_state_final);
|
||||
d_assert(&mme_sm.fsm, return NULL, "MME state machine creation failed");
|
||||
|
|
|
@ -44,11 +44,19 @@ status_t sgw_ctx_init()
|
|||
self.s11_port = GTPV2_C_UDP_PORT + 1;
|
||||
self.s11_node.addr = inet_addr("127.0.0.1");
|
||||
self.s11_node.port = GTPV2_C_UDP_PORT;
|
||||
list_init(&self.s11_node.initial_list);
|
||||
list_init(&self.s11_node.triggered_list);
|
||||
self.s11_node.local_list = &self.s11_node.triggered_list;
|
||||
self.s11_node.remote_list = &self.s11_node.initial_list;
|
||||
|
||||
self.s5c_addr = inet_addr("127.0.0.1");
|
||||
self.s5c_port = GTPV2_C_UDP_PORT + 2;
|
||||
self.s5c_node.addr = inet_addr("127.0.0.1");
|
||||
self.s5c_node.port = GTPV2_C_UDP_PORT + 3;
|
||||
list_init(&self.s5c_node.initial_list);
|
||||
list_init(&self.s5c_node.triggered_list);
|
||||
self.s5c_node.local_list = &self.s5c_node.initial_list;
|
||||
self.s5c_node.remote_list = &self.s5c_node.triggered_list;
|
||||
|
||||
self.s5u_addr = inet_addr("127.0.0.1");
|
||||
self.s5u_port = GTPV1_U_UDP_PORT;
|
||||
|
|
Loading…
Reference in New Issue