The branch, v3-6-test has been updated
       via  61629ff s3: Slightly simplify winbind_write_sock
       via  b25aeae s3: Fix some nonempty blank lines
      from  1daeb4a replace: Add missing eval to m4 script

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 61629ff07d56862b6eeb5bd4600571a5f81fe9b5
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 10 14:59:39 2011 +0100

    s3: Slightly simplify winbind_write_sock
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Thu Feb 10 17:00:46 CET 2011 on sn-devel-104

commit b25aeae433ea0fd9c386fb687a1e2c6aea93aa1d
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 10 11:00:18 2011 +0100

    s3: Fix some nonempty blank lines

-----------------------------------------------------------------------

Summary of changes:
 lib/addns/dnserr.h   |    4 ++--
 nsswitch/wb_common.c |   30 ++++++++++++++----------------
 2 files changed, 16 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/addns/dnserr.h b/lib/addns/dnserr.h
index 9e049ac..8638a2d 100644
--- a/lib/addns/dnserr.h
+++ b/lib/addns/dnserr.h
@@ -1,6 +1,6 @@
 /*
   Error codes for Linux DNS client library implementation
-  
+
   Copyright (C) 2006 Krishna Ganugapati <[email protected]>
   Copyright (C) 2006 Gerald Carter <[email protected]>
 
@@ -28,7 +28,7 @@
 
 /* The Splint code analysis tool (http://www.splint.org.) doesn't 
    like immediate structures. */
-   
+
 #ifdef _SPLINT_
 #undef HAVE_IMMEDIATE_STRUCTURES
 #endif
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index 9a3788a..ccc5142 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -403,31 +403,29 @@ static int winbind_write_sock(void *buffer, int count, 
int recursing,
 
                /* Write should be OK if fd not available for reading */
 
-               if (!FD_ISSET(winbindd_fd, &r_fds)) {
+               if (FD_ISSET(winbindd_fd, &r_fds)) {
 
-                       /* Do the write */
+                       /* 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)) {
+               /* Do the write */
 
-                               /* Write failed */
+               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 */
+                       /* Write failed */
 
                        winbind_close_sock();
-                       goto restart;
+                       return -1;
                }
+
+               nwritten += result;
        }
 
        return nwritten;


-- 
Samba Shared Repository

Reply via email to