Revision bbdd2ad0

b/iohandler.c
56 56
{
57 57
    IOHandlerRecord *ioh;
58 58

  
59
    assert(fd >= 0);
60

  
59 61
    if (!fd_read && !fd_write) {
60 62
        QLIST_FOREACH(ioh, &io_handlers, next) {
61 63
            if (ioh->fd == fd) {
b/qemu-char.c
2329 2329
    TCPCharDriver *s = chr->opaque;
2330 2330

  
2331 2331
    s->connected = 1;
2332
    qemu_set_fd_handler2(s->fd, tcp_chr_read_poll,
2333
                         tcp_chr_read, NULL, chr);
2332
    if (s->fd >= 0) {
2333
        qemu_set_fd_handler2(s->fd, tcp_chr_read_poll,
2334
                             tcp_chr_read, NULL, chr);
2335
    }
2334 2336
    qemu_chr_generic_open(chr);
2335 2337
}
2336 2338

  

Also available in: Unified diff