/* Set fd and local attributes */
devc->pollfd.fd = devc->fd;
devc->pollfd.events = G_IO_IN;
+ devc->pollfd.revents = 0;
/* Get the default attributes */
beaglelogic_get_samplerate(devc);
#ifdef HAVE_LIBUSB_1_0
if (session->ctx->usb_source_present) {
- timeout = block ? 0 : session->source_timeout;
ret = libusb_get_next_timeout(session->ctx->libusb_ctx, &tv);
if (ret < 0) {
sr_err("Error getting libusb timeout: %s",
p.fd = fd;
p.events = events;
+ p.revents = 0;
return _sr_session_source_add(session, &p, timeout, cb, cb_data, (gintptr)fd);
}
#else
p.fd = g_io_channel_unix_get_fd(channel);
p.events = events;
+ p.revents = 0;
#endif
return _sr_session_source_add(session, &p, timeout, cb, cb_data, (gintptr)channel);
/* 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,