diff options
Diffstat (limited to 'src/usb-linux.c')
| -rw-r--r-- | src/usb-linux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/usb-linux.c b/src/usb-linux.c index 334d967..f937de0 100644 --- a/src/usb-linux.c +++ b/src/usb-linux.c | |||
| @@ -121,6 +121,9 @@ static void tx_callback(struct libusb_transfer *xfer) | |||
| 121 | usbmuxd_log(LL_ERROR, "TX transfer overflow for device %d-%d", dev->bus, dev->address); | 121 | usbmuxd_log(LL_ERROR, "TX transfer overflow for device %d-%d", dev->bus, dev->address); |
| 122 | break; | 122 | break; |
| 123 | // and nothing happens (this never gets called) if the device is freed after a disconnect! (bad) | 123 | // and nothing happens (this never gets called) if the device is freed after a disconnect! (bad) |
| 124 | default: | ||
| 125 | // this should never be reached. | ||
| 126 | break; | ||
| 124 | } | 127 | } |
| 125 | // we can't usb_disconnect here due to a deadlock, so instead mark it as dead and reap it after processing events | 128 | // we can't usb_disconnect here due to a deadlock, so instead mark it as dead and reap it after processing events |
| 126 | // we'll do device_remove there too | 129 | // we'll do device_remove there too |
| @@ -190,6 +193,9 @@ static void rx_callback(struct libusb_transfer *xfer) | |||
| 190 | usbmuxd_log(LL_ERROR, "RX transfer overflow for device %d-%d", dev->bus, dev->address); | 193 | usbmuxd_log(LL_ERROR, "RX transfer overflow for device %d-%d", dev->bus, dev->address); |
| 191 | break; | 194 | break; |
| 192 | // and nothing happens (this never gets called) if the device is freed after a disconnect! (bad) | 195 | // and nothing happens (this never gets called) if the device is freed after a disconnect! (bad) |
| 196 | default: | ||
| 197 | // this should never be reached. | ||
| 198 | break; | ||
| 193 | } | 199 | } |
| 194 | free(xfer->buffer); | 200 | free(xfer->buffer); |
| 195 | dev->rx_xfer = NULL; | 201 | dev->rx_xfer = NULL; |
