s3:rpc_transport_np: use cli_state_is_connected() helper
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Mar 2010 13:08:42 +0000 (14:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 29 Mar 2010 16:11:15 +0000 (18:11 +0200)
metze

source3/rpc_client/rpc_transport_np.c

index de734fe17dad83ec903a17f49f69565b686d6341..5b6a2d6ae04a53ad064c0b13dc31f3dbc0418b7d 100644 (file)
@@ -30,7 +30,7 @@ struct rpc_transport_np_state {
 
 static int rpc_transport_np_state_destructor(struct rpc_transport_np_state *s)
 {
-       if (s->cli->fd == -1) {
+       if (!cli_state_is_connected(s->cli)) {
                DEBUG(10, ("socket was closed, no need to send close request.\n"));
                return 0;
        }