On 10/01/2014 02:10 PM, Eric Blake wrote:
> On 09/25/2014 02:07 PM, miny...@acm.org wrote:
>> From: Corey Minyard <cminy...@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 <cminy...@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

Reply via email to