Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Feb 10 17:00:46 CET 2011 on sn-devel-104
/* Write should be OK if fd not available for reading */
/* Write should be OK if fd not available for reading */
- if (!FD_ISSET(winbindd_fd, &r_fds)) {
+ if (FD_ISSET(winbindd_fd, &r_fds)) {
+ /* Pipe has closed on remote end */
- result = write(winbindd_fd,
- (char *)buffer + nwritten,
- count - nwritten);
+ winbind_close_sock();
+ goto restart;
+ }
- if ((result == -1) || (result == 0)) {
+ result = write(winbindd_fd,
+ (char *)buffer + nwritten,
+ count - nwritten);
- winbind_close_sock();
- return -1;
- }
-
- nwritten += result;
+ if ((result == -1) || (result == 0)) {
- } else {
-
- /* Pipe has closed on remote end */