lib: read_data->read_data_ntstatus
authorVolker Lendecke <vl@samba.org>
Wed, 19 Nov 2014 14:06:49 +0000 (14:06 +0000)
committerJeremy Allison <jra@samba.org>
Sat, 6 Dec 2014 23:12:07 +0000 (00:12 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/proto.h
source3/lib/ctdbd_conn.c
source3/lib/util_sock.c
source3/nmbd/asyncdns.c
source3/smbd/notify_inotify.c
source3/smbd/reply.c
source3/winbindd/winbindd_dual.c

index 68a3053a7b507973a8af2a671e58625b6fe1f992..dcecf74a8661a2193b14cbd8aa99afc0913968a0 100644 (file)
@@ -565,7 +565,7 @@ NTSTATUS read_fd_with_timeout(int fd, char *buf,
                                  size_t mincnt, size_t maxcnt,
                                  unsigned int time_out,
                                  size_t *size_ret);
-NTSTATUS read_data(int fd, char *buffer, size_t N);
+NTSTATUS read_data_ntstatus(int fd, char *buffer, size_t N);
 ssize_t write_data(int fd, const char *buffer, size_t N);
 ssize_t iov_buflen(const struct iovec *iov, int iovlen);
 uint8_t *iov_buf(TALLOC_CTX *mem_ctx, const struct iovec *iov, int iovcnt);
index 5dc007bf5cba7ac77ebcb90a5fe922e6de4cb812..7bdb37664f8d0ebc9509a99d11aeba09a46e56af 100644 (file)
@@ -379,7 +379,7 @@ static NTSTATUS ctdb_read_packet(int fd, TALLOC_CTX *mem_ctx,
                }
        }
 
-       status = read_data(fd, (char *)&msglen, sizeof(msglen));
+       status = read_data_ntstatus(fd, (char *)&msglen, sizeof(msglen));
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -396,8 +396,8 @@ static NTSTATUS ctdb_read_packet(int fd, TALLOC_CTX *mem_ctx,
 
        req->length = msglen;
 
-       status = read_data(fd, ((char *)req) + sizeof(msglen),
-                          msglen - sizeof(msglen));
+       status = read_data_ntstatus(fd, ((char *)req) + sizeof(msglen),
+                                   msglen - sizeof(msglen));
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
index 2bed9a90632672fc94720179d19b2de6747c09d8..d93e22d702c5a537076a1fff3fa59b45db1d42e3 100644 (file)
@@ -197,7 +197,7 @@ NTSTATUS read_fd_with_timeout(int fd, char *buf,
  on socket calls.
 ****************************************************************************/
 
-NTSTATUS read_data(int fd, char *buffer, size_t N)
+NTSTATUS read_data_ntstatus(int fd, char *buffer, size_t N)
 {
        return read_fd_with_timeout(fd, buffer, N, N, 0, NULL);
 }
index 90340efe3970600195f9f2462da0303adbcbec76..4468c7ba5d49cb48540a21aea2a7985bddf51620 100644 (file)
@@ -90,7 +90,7 @@ static void asyncdns_process(void)
        while (1) {
                NTSTATUS status;
 
-               status = read_data(fd_in, (char *)&r, sizeof(r));
+               status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r));
 
                if (!NT_STATUS_IS_OK(status)) {
                        break;
@@ -219,7 +219,7 @@ void run_dns_queue(struct messaging_context *msg)
                start_async_dns(msg);
        }
 
-       status = read_data(fd_in, (char *)&r, sizeof(r));
+       status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r));
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("read from child failed: %s\n", nt_errstr(status)));
index 1fcd8ecd7356fbb9cd781b4b87eeaea760ad8a36..a9b7131ef75607e3acc9916c0d0fe1ca2b84788e 100644 (file)
@@ -219,7 +219,7 @@ static void inotify_handler(struct tevent_context *ev, struct tevent_fd *fde,
        if (e == NULL) return;
        ((uint8_t *)e)[bufsize] = '\0';
 
-       status = read_data(in->fd, (char *)e0, bufsize);
+       status = read_data_ntstatus(in->fd, (char *)e0, bufsize);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Failed to read all inotify data - %s\n",
                        nt_errstr(status)));
index fd4ec53aed82441f94f673cc283eae7a24460d1d..cd13d68092dbb8c06dd51efe4f1a5fdd96960ee9 100644 (file)
@@ -4366,7 +4366,8 @@ void reply_writebraw(struct smb_request *req)
                                (int)tcount,(int)nwritten,(int)numtowrite));
                }
 
-               status = read_data(xconn->transport.sock, buf+4, numtowrite);
+               status = read_data_ntstatus(xconn->transport.sock, buf+4,
+                                           numtowrite);
 
                if (!NT_STATUS_IS_OK(status)) {
                        /* Try and give an error message
index b9c110f9b2e829773821083ec4246d98a8864711..43a27b3f4da6e45dd9427ea3eb556cabfcf59dc6 100644 (file)
@@ -53,7 +53,7 @@ static NTSTATUS child_read_request(int sock, struct winbindd_request *wreq)
 {
        NTSTATUS status;
 
-       status = read_data(sock, (char *)wreq, sizeof(*wreq));
+       status = read_data_ntstatus(sock, (char *)wreq, sizeof(*wreq));
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(3, ("child_read_request: read_data failed: %s\n",
                          nt_errstr(status)));
@@ -76,7 +76,8 @@ static NTSTATUS child_read_request(int sock, struct winbindd_request *wreq)
        /* Ensure null termination */
        wreq->extra_data.data[wreq->extra_len] = '\0';
 
-       status = read_data(sock, wreq->extra_data.data, wreq->extra_len);
+       status = read_data_ntstatus(sock, wreq->extra_data.data,
+                                   wreq->extra_len);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Could not read extra data: %s\n",
                          nt_errstr(status)));