Skip to content

Commit

Permalink
fixup usb: fixed usb connection order
Browse files Browse the repository at this point in the history
Signed-off-by: John Sanpe <[email protected]>
  • Loading branch information
sanpeqf committed Jun 11, 2024
1 parent da17dfd commit 406da5b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/connection/usb/xdbd_connection_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,21 @@ int xdbd_event_open_usb_connection(xdbd_usb_listening_t *uls) {
return XDBD_ERR;
}

uls->fd_in = xdbd_open((char *)uls->in.data, 0);
if (uls->fd_in < 0) {
bfdev_log_err("%s open failed: %m\n", uls->in.data);
return XDBD_ERR;
}
#if defined(XDBD_CONFIG_LINUX)
return usb_init_send(uls);
#endif

uls->fd_out = xdbd_open((char *)uls->out.data, 0);
if (uls->fd_out < 0) {
bfdev_log_err("%s open failed: %m\n", uls->out.data);
return XDBD_ERR;
}

#if defined(XDBD_CONFIG_LINUX)
return usb_init_send(uls);
#endif
uls->fd_in = xdbd_open((char *)uls->in.data, 0);
if (uls->fd_in < 0) {
bfdev_log_err("%s open failed: %m\n", uls->in.data);
return XDBD_ERR;
}

return XDBD_OK;
}
Expand Down

0 comments on commit 406da5b

Please sign in to comment.