From 24dcdedb3b639a5b5a64abc0eddbd56bbd6cf6ca Mon Sep 17 00:00:00 2001 From: hollings Date: Fri, 25 Mar 1994 22:34:21 +0000 Subject: [PATCH] made write failuers return the correct error code. --- common/src/rpcUtil.C | 7 +++++-- pdutil/src/rpcUtil.C | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/src/rpcUtil.C b/common/src/rpcUtil.C index 337413f..01bd005 100644 --- a/common/src/rpcUtil.C +++ b/common/src/rpcUtil.C @@ -29,8 +29,11 @@ int RPCdefaultXDRWrite(int handle, char *buf, u_int len) do { ret = write(handle, buf, len); } while (ret < 0 && errno == EINTR); - assert(ret == len); - return (ret); + + if (ret != len) + return(-1); + else + return (ret); } XDRrpc::~XDRrpc() diff --git a/pdutil/src/rpcUtil.C b/pdutil/src/rpcUtil.C index 337413f..01bd005 100644 --- a/pdutil/src/rpcUtil.C +++ b/pdutil/src/rpcUtil.C @@ -29,8 +29,11 @@ int RPCdefaultXDRWrite(int handle, char *buf, u_int len) do { ret = write(handle, buf, len); } while (ret < 0 && errno == EINTR); - assert(ret == len); - return (ret); + + if (ret != len) + return(-1); + else + return (ret); } XDRrpc::~XDRrpc() -- 1.8.3.1