qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Amit Shah
Subject: Re: [Qemu-devel] [PATCH 2/9] char: introduce tcp_chr_detach()
Date: Wed, 28 Aug 2013 13:40:50 +0530

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 simliar functions in the other patches.
> 
> Doesn't it make sense to move the tag field from TCPCharDriver to
> CharDriverState instead, so we don't need a new callback in the first
> place?

Yep, I thought about it, but it might get tricky to handle it:
tcp needs two, one for listening sockets and one for connected ones.

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?

                Amit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]