summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAdam Dickmeiss <dickmeiss@php.net>2001-05-30 11:58:25 +0000
committerAdam Dickmeiss <dickmeiss@php.net>2001-05-30 11:58:25 +0000
commit9667d6b38100dff4e133828832f75bc48985bca8 (patch)
tree647f1e08327944e85338314cccbb4e2751dd2d66 /ext
parent6cf6835a4dd6c8b4f9713e99c2aada6d6ae2ae15 (diff)
downloadphp-git-9667d6b38100dff4e133828832f75bc48985bca8.tar.gz
Fixed bug where yaz_connect could fail in cases where it shouldn't.
Diffstat (limited to 'ext')
-rw-r--r--ext/yaz/php_yaz.c10
1 files changed, 5 insertions, 5 deletions
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)