]> Git Repo - qemu.git/commitdiff
slirp: Properly initialize pollfds_idx of new sockets
authorJan Kiszka <[email protected]>
Fri, 22 Feb 2013 19:47:10 +0000 (20:47 +0100)
committerJan Kiszka <[email protected]>
Tue, 26 Feb 2013 11:10:21 +0000 (12:10 +0100)
Otherwise we may start processing sockets in slirp_pollfds_poll that
were created past slirp_pollfds_fill.

Signed-off-by: Jan Kiszka <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
slirp/socket.c

index a7ab933c4359fddb47be926cd3a8ca23b62df733..bb639aed9c3e4875f85af75e08c0766d6a4301b4 100644 (file)
@@ -51,6 +51,7 @@ socreate(Slirp *slirp)
     so->so_state = SS_NOFDREF;
     so->s = -1;
     so->slirp = slirp;
+    so->pollfds_idx = -1;
   }
   return(so);
 }
This page took 0.027195 seconds and 4 git commands to generate.