wbinfo: use wbcPing()
authorStefan Metzmacher <metze@samba.org>
Fri, 28 Mar 2008 18:01:54 +0000 (19:01 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 31 Mar 2008 10:17:34 +0000 (12:17 +0200)
metze
(This used to be commit 9a2f0b21925e630fa9b268cedbc19cf814686b42)

source3/nsswitch/wbinfo.c

index 15d6ae2dab28878f66f4b10bb2b815060048041f..7a68b3c838a8ba17bca1a325af8887903d89cc83 100644 (file)
@@ -27,8 +27,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-extern int winbindd_fd;
-
 static char winbind_separator_int(bool strict)
 {
        struct winbindd_response response;
@@ -1224,16 +1222,16 @@ static void wbinfo_get_auth_user(void)
 
 static bool wbinfo_ping(void)
 {
-        NSS_STATUS result;
+       wbcErr wbc_status;
 
-       result = winbindd_request_response(WINBINDD_PING, NULL, NULL);
+       wbc_status = wbcPing();
 
        /* Display response */
 
-       d_printf("Ping to winbindd %s on fd %d\n",
-                (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed", winbindd_fd);
+       d_printf("Ping to winbindd %s\n",
+                WBC_ERROR_IS_OK(wbc_status) ? "succeeded" : "failed");
 
-       return result == NSS_STATUS_SUCCESS;
+       return WBC_ERROR_IS_OK(wbc_status);
 }
 
 /* Main program */