mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-08-14 22:41:59 +03:00
firmware: Drop CEMU_TX_DATA when sim is in-active
When the emulated sim is in reset or without power, drop CEMU_TX_DATA. Change-Id: I796e548225a742cddfde12bd6a60e4d2e5c04c8f
This commit is contained in:
@@ -736,6 +736,12 @@ static void dispatch_usb_command_cardem(struct msgb *msg, struct cardem_inst *ci
|
||||
hdr = (struct simtrace_msg_hdr *) msg->l1h;
|
||||
switch (hdr->msg_type) {
|
||||
case SIMTRACE_MSGT_DT_CEMU_TX_DATA:
|
||||
/* drop message when sim is in-active */
|
||||
if (!card_ready(ci->ch)) {
|
||||
/* FIXME: enqueue an error message for IN */
|
||||
usb_buf_free(msg);
|
||||
return;
|
||||
}
|
||||
queue = card_emu_get_uart_tx_queue(ci->ch);
|
||||
llist_add_tail(&msg->list, queue);
|
||||
card_emu_have_new_uart_tx(ci->ch);
|
||||
|
||||
Reference in New Issue
Block a user