|
@@ -93,10 +93,6 @@ static gboolean fd_trampoline(GIOChannel *chan, GIOCondition cond, gpointer opaq
|
|
{
|
|
{
|
|
IOTrampoline *tramp = opaque;
|
|
IOTrampoline *tramp = opaque;
|
|
|
|
|
|
- if (tramp->opaque == NULL) {
|
|
|
|
- return FALSE;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if ((cond & G_IO_IN) && tramp->fd_read) {
|
|
if ((cond & G_IO_IN) && tramp->fd_read) {
|
|
tramp->fd_read(tramp->opaque);
|
|
tramp->fd_read(tramp->opaque);
|
|
}
|
|
}
|
|
@@ -119,9 +115,10 @@ int qemu_set_fd_handler(int fd,
|
|
if (tramp->tag != 0) {
|
|
if (tramp->tag != 0) {
|
|
g_io_channel_unref(tramp->chan);
|
|
g_io_channel_unref(tramp->chan);
|
|
g_source_remove(tramp->tag);
|
|
g_source_remove(tramp->tag);
|
|
|
|
+ tramp->tag = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- if (opaque) {
|
|
|
|
|
|
+ if (fd_read || fd_write || opaque) {
|
|
GIOCondition cond = 0;
|
|
GIOCondition cond = 0;
|
|
|
|
|
|
tramp->fd_read = fd_read;
|
|
tramp->fd_read = fd_read;
|