update it
This commit is contained in:
parent
74e44dd4f1
commit
2f9a95a161
|
@ -24,10 +24,8 @@ typedef struct _gtp_node_t {
|
|||
c_uint32_t addr; /**< Network byte order IP Address */
|
||||
c_uint16_t port; /**< Host byte order Port number */
|
||||
|
||||
list_t initial_list;
|
||||
list_t triggered_list;
|
||||
list_t *local_list;
|
||||
list_t *remote_list;
|
||||
list_t local_list;
|
||||
list_t remote_list;
|
||||
} gtp_node_t;
|
||||
|
||||
CORE_DECLARE(status_t) gtp_listen(net_sock_t **sock,
|
||||
|
|
|
@ -84,7 +84,7 @@ gtp_xact_t *gtp_xact_create(gtp_xact_ctx_t *context,
|
|||
tm_start(xact->tm_wait);
|
||||
|
||||
list_append(xact->org == GTP_LOCAL_ORIGINATOR ?
|
||||
xact->gnode->local_list : xact->gnode->remote_list, xact);
|
||||
&xact->gnode->local_list : &xact->gnode->remote_list, xact);
|
||||
|
||||
d_trace(1, "[%d]%s Create : xid = 0x%x\n",
|
||||
gnode->port,
|
||||
|
@ -135,8 +135,8 @@ status_t gtp_xact_delete(gtp_xact_t *xact)
|
|||
|
||||
tm_delete(xact->tm_wait);
|
||||
|
||||
list_remove(xact->org == GTP_LOCAL_ORIGINATOR ? xact->gnode->local_list :
|
||||
xact->gnode->remote_list, 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;
|
||||
|
@ -278,7 +278,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->initial_list);
|
||||
xact = list_first(&gnode->remote_list);
|
||||
break;
|
||||
|
||||
case GTP_CREATE_SESSION_RESPONSE_TYPE:
|
||||
|
@ -290,7 +290,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->triggered_list);
|
||||
xact = list_first(&gnode->local_list);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -120,10 +120,8 @@ 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.triggered_list;
|
||||
sgw->gnode.remote_list = &sgw->gnode.initial_list;
|
||||
list_init(&sgw->gnode.local_list);
|
||||
list_init(&sgw->gnode.remote_list);
|
||||
|
||||
list_append(&sgw_list, sgw);
|
||||
|
||||
|
|
|
@ -22,10 +22,8 @@ status_t pgw_ctx_init()
|
|||
self.s5c_port = GTPV2_C_UDP_PORT + 3;
|
||||
self.s5c_node.addr = inet_addr("127.0.0.1");
|
||||
self.s5c_node.port = GTPV2_C_UDP_PORT + 2;
|
||||
list_init(&self.s5c_node.initial_list);
|
||||
list_init(&self.s5c_node.triggered_list);
|
||||
self.s5c_node.local_list = &self.s5c_node.triggered_list;
|
||||
self.s5c_node.remote_list = &self.s5c_node.initial_list;
|
||||
list_init(&self.s5c_node.local_list);
|
||||
list_init(&self.s5c_node.remote_list);
|
||||
|
||||
self.s5u_addr = inet_addr("127.0.0.1");
|
||||
self.s5u_port = GTPV1_U_UDP_PORT + 1;
|
||||
|
|
|
@ -43,19 +43,15 @@ 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;
|
||||
list_init(&self.s11_node.local_list);
|
||||
list_init(&self.s11_node.remote_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.triggered_list;
|
||||
self.s5c_node.remote_list = &self.s5c_node.initial_list;
|
||||
list_init(&self.s5c_node.local_list);
|
||||
list_init(&self.s5c_node.remote_list);
|
||||
|
||||
self.s5u_addr = inet_addr("127.0.0.1");
|
||||
self.s5u_port = GTPV1_U_UDP_PORT;
|
||||
|
|
Loading…
Reference in New Issue