From 9667d6b38100dff4e133828832f75bc48985bca8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 30 May 2001 11:58:25 +0000 Subject: Fixed bug where yaz_connect could fail in cases where it shouldn't. --- ext/yaz/php_yaz.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/yaz/php_yaz.c') diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index f4fb772e15..218e2613e0 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -996,14 +996,14 @@ static int do_event (int *id, int timeout) } else if (p->state == PHP_YAZ_STATE_CONNECTING) { - if (FD_ISSET (fd, &input)) + if (FD_ISSET (fd, &output)) { - do_close(p); - p->error = PHP_YAZ_ERROR_CONNECT; + send_init(p); } - else if (FD_ISSET (fd, &output)) + else if (FD_ISSET (fd, &input)) { - send_init(p); + do_close(p); + p->error = PHP_YAZ_ERROR_CONNECT; } } else if (p->state == PHP_YAZ_STATE_ESTABLISHED) -- cgit v1.2.1