X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fusb.c;h=5038441cc97c3db869ff5969097baaa6e36e439a;hb=89efe06460024c2a33e57178f5812bf23c2f9888;hp=f5b20c99cc02e61893a6654c67801ef8ade5f594;hpb=452986bec416f00ac7fd573a460b9374d47fbf54;p=libsigrok.git diff --git a/src/usb.c b/src/usb.c index f5b20c99..5038441c 100644 --- a/src/usb.c +++ b/src/usb.c @@ -251,6 +251,7 @@ SR_PRIV int usb_source_add(struct sr_session *session, struct sr_context *ctx, /* Add event, set by USB wait thread, to session poll set. */ ctx->usb_pollfd.fd = ctx->usb_wait_complete_event; ctx->usb_pollfd.events = G_IO_IN; + ctx->usb_pollfd.revents = 0; ctx->usb_cb = cb; ctx->usb_cb_data = cb_data; sr_session_source_add_pollfd(session, &ctx->usb_pollfd, timeout,