|
|
|
@ -427,7 +427,9 @@ static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) |
|
|
|
|
memcpy(apdu_command + sizeof(ac.hdr), ac.dc, ac.lc.tot); // copy APDU command data
|
|
|
|
|
} |
|
|
|
|
// send APDU to card
|
|
|
|
|
RsproPDU_t *pdu = rspro_gen_TpduModem2Card(g_client->srv_conn.clslot, &(BankSlot_t){ .bankId = 0, .slotNr = 0}, apdu_command, sizeof(ac.hdr) + ac.lc.tot); // create RSPRO packet
|
|
|
|
|
BankSlot_t bslot; |
|
|
|
|
bank_slot2rspro(&bslot, &g_client->bankd_slot); |
|
|
|
|
RsproPDU_t *pdu = rspro_gen_TpduModem2Card(g_client->srv_conn.clslot, &bslot, apdu_command, sizeof(ac.hdr) + ac.lc.tot); // create RSPRO packet
|
|
|
|
|
ipa_client_conn_send_rspro(g_client->bankd_conn, pdu); // send RSPRO packet
|
|
|
|
|
// the response will come separately
|
|
|
|
|
free(apdu_command); |
|
|
|
@ -632,8 +634,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)); |
|
|
|
|
/* FIXME: Store bankslot */ |
|
|
|
|
//g_client->bankd_slot = pdu->msg.choice.configClientBankReq.bankSlot;
|
|
|
|
|
rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); |
|
|
|
|
g_client->bankd_port = ntohs(pdu->msg.choice.configClientBankReq.bankd.port); |
|
|
|
|
/* instruct bankd FSM to connect */ |
|
|
|
|
osmo_fsm_inst_dispatch(g_client->bankd_fi, BDC_E_ESTABLISH, NULL); |
|
|
|
|