client: Don't ntohs() integer values from asn1 decoder

The ASN1 decoder takes care of endianness for us.

Change-Id: I9c3127b4fb195db5e81702e043e4fe595474b561
This commit is contained in:
Harald Welte 2019-03-17 09:35:16 +01:00
parent 9cf013a343
commit 7a950888f5
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ static int srvc_handle_rx(struct rspro_server_conn *srvc, const RsproPDU_t *pdu)
/* store/set the bankd ip/port as instructed by the server */
osmo_talloc_replace_string(g_client, &g_client->bankd_host,
rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip));
g_client->bankd_port = ntohs(pdu->msg.choice.configClientBankReq.bankd.port);
g_client->bankd_port = pdu->msg.choice.configClientBankReq.bankd.port;
rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot);
/* instruct bankd FSM to connect */
osmo_fsm_inst_dispatch(g_client->bankd_fi, BDC_E_ESTABLISH, NULL);

View File

@ -635,7 +635,7 @@ static int srvc_handle_rx(struct rspro_server_conn *srvc, const RsproPDU_t *pdu)
osmo_talloc_replace_string(g_client, &g_client->bankd_host,
rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip));
rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot);
g_client->bankd_port = ntohs(pdu->msg.choice.configClientBankReq.bankd.port);
g_client->bankd_port = pdu->msg.choice.configClientBankReq.bankd.port;
/* instruct bankd FSM to connect */
osmo_fsm_inst_dispatch(g_client->bankd_fi, BDC_E_ESTABLISH, NULL);
/* send response to server */