remsim-client: store last 'status'
Keep a local copy of the last status message of the cardem firmware. Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70
This commit is contained in:
parent
6a0248b224
commit
943ae6286a
|
@ -86,6 +86,7 @@ struct st_slot {
|
|||
struct cardem_inst {
|
||||
/* slot on which this card emulation instance runs */
|
||||
struct st_slot *slot;
|
||||
struct cardemu_usb_msg_status last_status;
|
||||
};
|
||||
|
||||
/* global GSMTAP instance */
|
||||
|
@ -544,6 +545,11 @@ static int process_irq_status(struct cardem_inst *ci, const uint8_t *buf, int le
|
|||
-1 /* FIXME: make this dependent on board */);
|
||||
server_conn_send_rspro(&g_client->bankd_conn, pdu);
|
||||
|
||||
if (ci->last_status.flags != status->flags) {
|
||||
ci->last_status = *status;
|
||||
} else
|
||||
ci->last_status = *status;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue