diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-12 14:05:58 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-12 14:51:15 +0200 |
commit | c344ad30435feb235b2423a6f066ab5eba30d2fb (patch) | |
tree | 9cf5b8246290e733ffaa9d3f16dc24937f2739f9 /source3/smbd | |
parent | a36472dd384e54374cc151cd4159f3786b4ec02b (diff) | |
download | samba-c344ad30435feb235b2423a6f066ab5eba30d2fb.tar.gz samba-c344ad30435feb235b2423a6f066ab5eba30d2fb.tar.bz2 samba-c344ad30435feb235b2423a6f066ab5eba30d2fb.zip |
write_data already guarantees everything was written
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 65778ab0fc..7605ad70b5 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -59,15 +59,12 @@ bool srv_send_smb(int fd, char *buffer, len = smb_len(buf_out) + 4; - while (nwritten < len) { - ret = write_data(fd,buf_out+nwritten,len - nwritten); - if (ret <= 0) { - DEBUG(0,("Error writing %d bytes to client. %d. (%s)\n", - (int)len,(int)ret, strerror(errno) )); - srv_free_enc_buffer(buf_out); - goto out; - } - nwritten += ret; + ret = write_data(fd,buf_out+nwritten,len - nwritten); + if (ret <= 0) { + DEBUG(0,("Error writing %d bytes to client. %d. (%s)\n", + (int)len,(int)ret, strerror(errno) )); + srv_free_enc_buffer(buf_out); + goto out; } SMB_PERFCOUNT_SET_MSGLEN_OUT(pcd, len); |