From: Adam Dickmeiss Date: Wed, 7 Oct 2015 14:04:43 +0000 (+0200) Subject: ZOOM C: tweak when connection failed is returned X-Git-Tag: v5.14.11~4 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=ab99e2d94176eef3b1b23ef3f0f180c6d5077ea6;ds=sidebyside ZOOM C: tweak when connection failed is returned For cases with multiple socket addresses for some hostname, eg localhost IPV4+IPV6, the code now properly returns "connection failed" rather than "connection lost". --- diff --git a/src/zoom-c.c b/src/zoom-c.c index 3e5d647..5c62a07 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2004,7 +2004,8 @@ static void ZOOM_connection_do_io(ZOOM_connection c, int mask) else ZOOM_connection_exec_task(c); } - c->state = STATE_ESTABLISHED; + if (c->cs && cs_look(c->cs) == CS_DATA) + c->state = STATE_ESTABLISHED; } else {