summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-12 14:05:58 +0200
committerVolker Lendecke <vl@samba.org>2009-04-12 14:51:15 +0200
commitc344ad30435feb235b2423a6f066ab5eba30d2fb (patch)
tree9cf5b8246290e733ffaa9d3f16dc24937f2739f9 /source3
parenta36472dd384e54374cc151cd4159f3786b4ec02b (diff)
downloadsamba-c344ad30435feb235b2423a6f066ab5eba30d2fb.tar.gz
samba-c344ad30435feb235b2423a6f066ab5eba30d2fb.tar.bz2
samba-c344ad30435feb235b2423a6f066ab5eba30d2fb.zip
write_data already guarantees everything was written
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c15
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);