From 9667d6b38100dff4e133828832f75bc48985bca8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 30 May 2001 11:58:25 +0000 Subject: [PATCH] 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(-) diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index f4fb772e15b..218e2613e0f 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -996,15 +996,15 @@ 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)) + { + send_init(p); + } + else if (FD_ISSET (fd, &input)) { do_close(p); p->error = PHP_YAZ_ERROR_CONNECT; } - else if (FD_ISSET (fd, &output)) - { - send_init(p); - } } else if (p->state == PHP_YAZ_STATE_ESTABLISHED) {