提交 58a5d33a 编写于 作者: F Frediano Ziglio 提交者: Gerd Hoffmann

spice: remove only written event_mask field

Signed-off-by: NFrediano Ziglio <fziglio@redhat.com>
Message-id: 20171122135625.16625-3-fziglio@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 44e8f229
...@@ -89,7 +89,6 @@ static void timer_remove(SpiceTimer *timer) ...@@ -89,7 +89,6 @@ static void timer_remove(SpiceTimer *timer)
struct SpiceWatch { struct SpiceWatch {
int fd; int fd;
int event_mask;
SpiceWatchFunc func; SpiceWatchFunc func;
void *opaque; void *opaque;
}; };
...@@ -111,11 +110,10 @@ static void watch_update_mask(SpiceWatch *watch, int event_mask) ...@@ -111,11 +110,10 @@ static void watch_update_mask(SpiceWatch *watch, int event_mask)
IOHandler *on_read = NULL; IOHandler *on_read = NULL;
IOHandler *on_write = NULL; IOHandler *on_write = NULL;
watch->event_mask = event_mask; if (event_mask & SPICE_WATCH_EVENT_READ) {
if (watch->event_mask & SPICE_WATCH_EVENT_READ) {
on_read = watch_read; on_read = watch_read;
} }
if (watch->event_mask & SPICE_WATCH_EVENT_WRITE) { if (event_mask & SPICE_WATCH_EVENT_WRITE) {
on_write = watch_write; on_write = watch_write;
} }
qemu_set_fd_handler(watch->fd, on_read, on_write, watch); qemu_set_fd_handler(watch->fd, on_read, on_write, watch);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册