Fix bug #8197 - winbind does not properly detect when a DC connection is dead.
commit0efcc94fb834aeb03e8edc3034aa0cdeefdc0985
authorJeremy Allison <jra@samba.org>
Fri, 3 Jun 2011 17:22:44 +0000 (3 10:22 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 6 Jun 2011 19:53:16 +0000 (6 21:53 +0200)
tree3a6a3c31414f75b9367cbaa6002ff4f6f2b69a33
parent976a43c5aac7a1b972efc1a4f600013b789eabaa
Fix bug #8197 - winbind does not properly detect when a DC connection is dead.

Only waiting for writability doesn't get fd errors back with poll.
So always begin by selecting for readability, and if we get it then
see if bytes were available to read or it really is an error condition.

If bytes were available, remove the select on read as we know we
will retrieve the error when we've finished writing and start
reading the reply (or the write will timeout or fail).

Metze and Volker please check.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Jun  6 21:53:16 CEST 2011 on sn-devel-104
lib/async_req/async_sock.c