read_socket_with_timeout_ntstatus->read_socket_with_timeout
authorVolker Lendecke <vl@samba.org>
Fri, 25 Jan 2008 22:43:50 +0000 (23:43 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 2 Feb 2008 10:03:22 +0000 (11:03 +0100)
(This used to be commit 90554799afa42855c3e7b87dc632e67f0952f988)

source3/lib/util_sock.c
source3/libsmb/clientgen.c
source3/smbd/chgpasswd.c
source3/smbd/process.c

index d0d321ee39f3487c8915b5de26332fb0a0e06875..fcea5d8be661b538cbdaa8e6aa7dda400f8282e9 100644 (file)
@@ -913,10 +913,10 @@ ssize_t read_udp_v4_socket(int fd,
  time_out = timeout in milliseconds
 ****************************************************************************/
 
-NTSTATUS read_socket_with_timeout_ntstatus(int fd, char *buf,
-                                          size_t mincnt, size_t maxcnt,
-                                          unsigned int time_out,
-                                          size_t *size_ret)
+NTSTATUS read_socket_with_timeout(int fd, char *buf,
+                                 size_t mincnt, size_t maxcnt,
+                                 unsigned int time_out,
+                                 size_t *size_ret)
 {
        fd_set fds;
        int selrtn;
@@ -1052,7 +1052,7 @@ ssize_t read_data(int fd,char *buffer,size_t N, enum smb_read_errors *pre)
 
        set_smb_read_error(pre, SMB_READ_OK);
 
-       status = read_socket_with_timeout_ntstatus(fd, buffer, N, N, 0, NULL);
+       status = read_socket_with_timeout(fd, buffer, N, N, 0, NULL);
 
        if (NT_STATUS_IS_OK(status)) {
                return N;
@@ -1138,8 +1138,7 @@ NTSTATUS read_smb_length_return_keepalive(int fd, char *inbuf,
        int msg_type;
        NTSTATUS status;
 
-       status = read_socket_with_timeout_ntstatus(fd, inbuf, 4, 4, timeout,
-                                                  NULL);
+       status = read_socket_with_timeout(fd, inbuf, 4, 4, timeout, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -1255,7 +1254,7 @@ ssize_t receive_smb_raw(int fd,
 
                set_smb_read_error(pre, SMB_READ_OK);
 
-               status = read_socket_with_timeout_ntstatus(
+               status = read_socket_with_timeout(
                        fd, buffer+4, len, len, timeout, &len);
 
                if (!NT_STATUS_IS_OK(status)) {
index 086c158ed2925209581c3573ff31ba7c805a27af..7a7377f1482bc17f1f64852b7c260f534da2ffd4 100644 (file)
@@ -184,7 +184,7 @@ ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len)
 
        set_smb_read_error(&cli->smb_rw_error, SMB_READ_OK);
 
-       status = read_socket_with_timeout_ntstatus(
+       status = read_socket_with_timeout(
                cli->fd, buffer, len, len, cli->timeout, NULL);
        if (NT_STATUS_IS_OK(status)) {
                return len;
index bd5ff1f5232fc8d8cbef714d4a4df70b5012abb1..e7ab60d22fdf9c203894d329fab0253c141932d3 100644 (file)
@@ -265,7 +265,7 @@ static int expect(int master, char *issue, char *expected)
 
                while (True) {
                        NTSTATUS status;
-                       status = read_socket_with_timeout_ntstatus(
+                       status = read_socket_with_timeout(
                                master, buffer + nread, 1,
                                sizeof(buffer) - nread - 1,
                                timeout, &len);
index e21229109da53b84cd81ee4eeb74c8baf11e7d0e..83e51e3892ffadadcd671337dea9bfc742b9af4e 100644 (file)
@@ -141,8 +141,7 @@ static NTSTATUS read_packet_remainder(int fd, char *buffer,
                return NT_STATUS_OK;
        }
 
-       return read_socket_with_timeout_ntstatus(fd, buffer, len, len,
-                                                timeout, NULL);
+       return read_socket_with_timeout(fd, buffer, len, len, timeout, NULL);
 }
 
 /****************************************************************************
@@ -176,7 +175,7 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx,
 
        memcpy(writeX_header, lenbuf, sizeof(lenbuf));
 
-       status = read_socket_with_timeout_ntstatus(
+       status = read_socket_with_timeout(
                fd, writeX_header + 4,
                STANDARD_WRITE_AND_X_HEADER_SIZE,
                STANDARD_WRITE_AND_X_HEADER_SIZE,