Commit 24ac283a authored by Hans de Goede's avatar Hans de Goede Committed by Gerd Hoffmann
Browse files

usb-redir: Use reject rather the disconnect on bad ep info



So that the client gets a notification about us disconnecting the device.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 7e03d178
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1353,7 +1353,8 @@ static void usbredir_ep_info(void *priv,
        case usb_redir_type_interrupt:
            if (dev->endpoint[i].interval == 0) {
                ERROR("Received 0 interval for isoc or irq endpoint\n");
                usbredir_device_disconnect(dev);
                usbredir_reject_device(dev);
                return;
            }
            /* Fall through */
        case usb_redir_type_control:
@@ -1363,7 +1364,7 @@ static void usbredir_ep_info(void *priv,
            break;
        default:
            ERROR("Received invalid endpoint type\n");
            usbredir_device_disconnect(dev);
            usbredir_reject_device(dev);
            return;
        }
    }