Oops! Change inbound_streams to outbound_streams (#63)

This commit is contained in:
Sukchan Lee 2018-05-19 06:06:02 +09:00
parent 85a2a64b65
commit fe84604fa0
5 changed files with 16 additions and 15 deletions

View File

@ -1610,7 +1610,7 @@ mme_enb_t* mme_enb_add(sock_id sock, c_sockaddr_t *addr)
enb->addr = addr;
enb->sock_type = mme_enb_sock_type(enb->sock);
enb->inbound_streams = context_self()->parameter.sctp_streams;
enb->outbound_streams = context_self()->parameter.sctp_streams;
list_init(&enb->enb_ue_list);
@ -1941,7 +1941,7 @@ mme_ue_t* mme_ue_add(enb_ue_t *enb_ue)
* 0 : Non UE signalling
* 1-29 : UE specific association
*/
mme_ue->ostream_id = NEXT_ID(self.ostream_id, 1, enb->inbound_streams-1);
mme_ue->ostream_id = NEXT_ID(self.ostream_id, 1, enb->outbound_streams-1);
/* Create New GUTI */
mme_ue_new_guti(mme_ue);

View File

@ -149,7 +149,7 @@ typedef struct _mme_enb_t {
sock_id sock; /* eNB S1AP Socket */
c_sockaddr_t *addr; /* eNB S1AP Address */
c_uint16_t inbound_streams; /* SCTP Max number of inbound streams */
c_uint16_t outbound_streams; /* SCTP Max number of outbound streams */
c_uint8_t num_of_supported_ta_list;
tai_t supported_ta_list[MAX_NUM_OF_TAI * MAX_NUM_OF_BPLMN];

View File

@ -105,16 +105,16 @@ void mme_state_operational(fsm_t *s, event_t *e)
enb = mme_enb_add(sock, addr);
d_assert(enb, break, "Null param");
#else
c_uint16_t inbound_streams = 0;
c_uint16_t outbound_streams = 0;
mme_enb_t *enb = NULL;
enb = mme_enb_add(sock, addr);
d_assert(enb, break, "Null param");
inbound_streams = (c_uint16_t)event_get_param3(e);
if (inbound_streams)
enb->inbound_streams =
c_min(inbound_streams, enb->inbound_streams);
outbound_streams = (c_uint16_t)event_get_param3(e);
if (outbound_streams)
enb->outbound_streams =
c_min(outbound_streams, enb->outbound_streams);
#endif
}
else
@ -161,7 +161,7 @@ void mme_state_operational(fsm_t *s, event_t *e)
sock_id sock = 0;
c_sockaddr_t *addr = NULL;
pkbuf_t *pkbuf = NULL;
c_uint16_t inbound_streams = 0;
c_uint16_t outbound_streams = 0;
sock = (sock_id)event_get_param1(e);
d_assert(sock, break, "Null param");
@ -172,7 +172,7 @@ void mme_state_operational(fsm_t *s, event_t *e)
pkbuf = (pkbuf_t *)event_get_param3(e);
d_assert(pkbuf, break, "Null param");
inbound_streams = (c_uint16_t)event_get_param4(e);
outbound_streams = (c_uint16_t)event_get_param4(e);
enb = mme_enb_find_by_addr(addr);
CORE_FREE(addr);
@ -180,9 +180,9 @@ void mme_state_operational(fsm_t *s, event_t *e)
d_assert(FSM_STATE(&enb->sm), pkbuf_free(pkbuf); break,
"No S1AP State Machine");
if (inbound_streams)
enb->inbound_streams =
c_min(inbound_streams, enb->inbound_streams);
if (outbound_streams)
enb->outbound_streams =
c_min(outbound_streams, enb->outbound_streams);
rv = s1ap_decode_pdu(&message, pkbuf);
if (rv != CORE_OK)

View File

@ -195,7 +195,7 @@ int s1ap_recv_handler(sock_id sock, void *data)
event_set_param1(&e, (c_uintptr_t)sock);
event_set_param2(&e, (c_uintptr_t)addr);
event_set_param3(&e, (c_uintptr_t)pkbuf);
event_set_param4(&e, (c_uintptr_t)sinfo.inbound_streams);
event_set_param4(&e, (c_uintptr_t)sinfo.outbound_streams);
rv = mme_event_send(&e);
if (rv != CORE_OK)
{

View File

@ -440,7 +440,7 @@ static int s1ap_usrsctp_recv_handler(struct socket *sock,
event_set_param1(&e, (c_uintptr_t)sock);
event_set_param2(&e, (c_uintptr_t)addr);
event_set_param3(&e, (c_uintptr_t)
not->sn_assoc_change.sac_inbound_streams);
not->sn_assoc_change.sac_outbound_streams);
if (mme_event_send(&e) != CORE_OK)
{
CORE_FREE(addr);
@ -510,6 +510,7 @@ static int s1ap_usrsctp_recv_handler(struct socket *sock,
event_set_param1(&e, (c_uintptr_t)sock);
event_set_param2(&e, (c_uintptr_t)addr);
event_set_param3(&e, (c_uintptr_t)pkbuf);
event_set_param4(&e, (c_uintptr_t)0);
if (mme_event_send(&e) != CORE_OK)
{
pkbuf_free(pkbuf);