Re: [Qemu-devel] [PATCH 2/9] char: introduce tcp_chr_detach()

2013-08-28 Thread Gerd Hoffmann
> We don't need to worry about the listening socket for this patchset, > should we then just keep that in the tcp struct, and use the tag as > the generic one in CharDriverState for all of the backends? Yes, I think that will simplify the series. And maybe name the one one in CharDriverState 'fd

Re: [Qemu-devel] [PATCH 2/9] char: introduce tcp_chr_detach()

2013-08-28 Thread Amit Shah
On (Wed) 28 Aug 2013 [09:09:47], Gerd Hoffmann wrote: > Hi, > > > +static void tcp_chr_detach(CharDriverState *chr) > > +{ > > +TCPCharDriver *s = chr->opaque; > > + > > +if (s->tag) { > > +io_remove_watch_poll(s->tag); > > +s->tag = 0; > > +} > > +} > > Lots of siml

Re: [Qemu-devel] [PATCH 2/9] char: introduce tcp_chr_detach()

2013-08-28 Thread Gerd Hoffmann
Hi, > +static void tcp_chr_detach(CharDriverState *chr) > +{ > +TCPCharDriver *s = chr->opaque; > + > +if (s->tag) { > +io_remove_watch_poll(s->tag); > +s->tag = 0; > +} > +} Lots of simliar functions in the other patches. Doesn't it make sense to move the tag field

[Qemu-devel] [PATCH 2/9] char: introduce tcp_chr_detach()

2013-08-27 Thread Amit Shah
Remove any registered callbacks if a frontend is detached. CC: Signed-off-by: Amit Shah --- qemu-char.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index f27fdb6..e235334 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2321,6 +2321,16 @@ typedef str