Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlipTDI crashing on Linux when connecting to a Linux system #267

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flip_tdi/helpers/ftdi_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ static FtdiUsb* ftdi_cur = NULL;

static void ftdi_usb_callback_tx_immediate(void* context) {
FtdiUsb* ftdi_usb = context;
if (!ftdi_usb || !ftdi_usb->thread) return;

furi_thread_flags_set(furi_thread_get_id(ftdi_usb->thread), EventTxImmediate);
}

Expand Down Expand Up @@ -186,6 +188,7 @@ static void ftdi_usb_deinit(usbd_device* dev) {
free(ftdi_usb->usb.str_serial_descr);
ftdi_usb->usb.str_serial_descr = NULL;
free(ftdi_usb);
ftdi_usb = NULL;
}

static void ftdi_usb_send(usbd_device* dev, uint8_t* buf, uint16_t len) {
Expand Down