From: Corey Minyard <cminyard@mvista.com>
To: Eric Blake <eblake@redhat.com>, minyard@acm.org, qemu-devel@nongnu.org
Cc: bcketchum@gmail.com, mjg59@srcf.ucam.org, hwd@huawei.com,
afaerber@suse.de, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 5/6] qemu-char: Add reconnecting to client sockets
Date: Wed, 01 Oct 2014 16:03:53 -0500 [thread overview]
Message-ID: <542C6C39.6040209@mvista.com> (raw)
In-Reply-To: <542C5197.30506@redhat.com>
On 10/01/2014 02:10 PM, Eric Blake wrote:
> On 09/25/2014 02:07 PM, minyard@acm.org wrote:
>> From: Corey Minyard <cminyard@mvista.com>
>>
>> Adds a "reconnect" option to socket backends that gives a reconnect
>> timeout. This only applies to client sockets. If the other end
>> of a socket closes the connection, qemu will attempt to reconnect
>> after the given number of seconds.
>>
>> Signed-off-by: Corey Minyard <cminyard@mvista.com>
>> ---
>> qapi-schema.json | 15 ++++++----
>> qemu-char.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
>> qemu-options.hx | 20 ++++++++-----
>> 3 files changed, 105 insertions(+), 18 deletions(-)
>>
>>
>> +static gboolean socket_reconnect_timeout(gpointer opaque);
>> +
> Do you really need a forward declaration of this static function, or can
> you just stick the body of the function here?
It's a circular reference. The timeout calls the function to restart
the timer, which
then references the timeout.
>
>> @@ -2964,6 +2979,10 @@ static void tcp_chr_close(CharDriverState *chr)
>> TCPCharDriver *s = chr->opaque;
>> int i;
>>
>> + if (s->reconnect_timer) {
>> + g_source_remove(s->reconnect_timer);
>> + s->reconnect_timer = 0;
> TAB damage.
Dang, I thought I had fixed all those. I'll do another round of patches
with
that and the unnecessary () removed.
-corey
next prev parent reply other threads:[~2014-10-01 21:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 20:07 [Qemu-devel] [PATCH v3 0/6] chardev: Add reconnecting to client sockets minyard
2014-09-25 20:07 ` [Qemu-devel] [PATCH 1/6] qemu-char: Make the filename size for a chardev a #define minyard
2014-09-25 20:07 ` [Qemu-devel] [PATCH 2/6] qemu-char: Rework qemu_chr_open_socket() for reconnect minyard
2014-09-25 20:07 ` [Qemu-devel] [PATCH 3/6] qemu-char: Move some items into TCPCharDriver minyard
2014-09-25 20:07 ` [Qemu-devel] [PATCH 4/6] qemu-char: set socket filename to disconnected when not connected minyard
2014-09-25 20:07 ` [Qemu-devel] [PATCH 5/6] qemu-char: Add reconnecting to client sockets minyard
2014-10-01 12:38 ` Corey Minyard
2014-10-01 18:15 ` Paolo Bonzini
2014-10-01 19:10 ` Eric Blake
2014-10-01 21:03 ` Corey Minyard [this message]
2014-09-25 20:07 ` [Qemu-devel] [PATCH 6/6] qemu-char: Print the remote and local addresses for a socket minyard
-- strict thread matches above, loose matches on Subject: below --
2014-10-02 16:17 [Qemu-devel] [PATCH v5 0/6] Add reconnecting to client sockets minyard
2014-10-02 16:17 ` [Qemu-devel] [PATCH 5/6] qemu-char: " minyard
2014-10-03 22:22 ` Paolo Bonzini
2014-10-04 3:24 ` Corey Minyard
2014-10-04 15:54 ` Paolo Bonzini
2014-10-01 21:09 [Qemu-devel] [PATCH v4 0/6] Add reconnect capability to sockets minyard
2014-10-01 21:09 ` [Qemu-devel] [PATCH 5/6] qemu-char: Add reconnecting to client sockets minyard
2014-10-02 12:25 ` Paolo Bonzini
2014-09-22 16:59 [Qemu-devel] [PATCH v2 0/6] chardev: " minyard
2014-09-22 16:59 ` [Qemu-devel] [PATCH 5/6] qemu-char: " minyard
2014-09-22 20:26 ` Eric Blake
2014-09-21 23:04 [Qemu-devel] [PATCH 0/6] Add reconnect capability for " minyard
2014-09-21 23:04 ` [Qemu-devel] [PATCH 5/6] qemu-char: Add reconnecting to " minyard
2014-09-22 8:02 ` Paolo Bonzini
2014-09-22 20:24 ` Eric Blake
2014-09-22 20:36 ` Corey Minyard
2014-09-22 20:53 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=542C6C39.6040209@mvista.com \
--to=cminyard@mvista.com \
--cc=afaerber@suse.de \
--cc=bcketchum@gmail.com \
--cc=eblake@redhat.com \
--cc=hwd@huawei.com \
--cc=minyard@acm.org \
--cc=mjg59@srcf.ucam.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.