diff options
author | Jeremy Allison <jra@samba.org> | 2001-06-09 01:38:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-06-09 01:38:54 +0000 |
commit | 1b3977c5367a0b713b194f369abd9872ae01ac2a (patch) | |
tree | acbfc993c1bfdd750797a785fac55f1834c7a406 /source/smbd/reply.c | |
parent | 81b5a628d1471f71964b21817b9bec1ac80585c4 (diff) | |
download | samba-1b3977c5367a0b713b194f369abd9872ae01ac2a.tar.gz samba-1b3977c5367a0b713b194f369abd9872ae01ac2a.tar.xz samba-1b3977c5367a0b713b194f369abd9872ae01ac2a.zip |
*Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index d3f2527b35d..9705bfd6b3d 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2487,7 +2487,8 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, CVAL(outbuf,smb_com) = SMBwritebraw; SSVALS(outbuf,smb_vwv0,-1); outsize = set_message(outbuf,Protocol>PROTOCOL_COREPLUS?1:0,0,True); - send_smb(smbd_server_fd(),outbuf); + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("reply_writebraw: send_smb failed.\n"); /* Now read the raw data into the buffer and write it */ if (read_smb_length(smbd_server_fd(),inbuf,SMB_SECONDARY_WAIT) == -1) { @@ -3172,7 +3173,8 @@ int reply_echo(connection_struct *conn, smb_setlen(outbuf,outsize - 4); - send_smb(smbd_server_fd(),outbuf); + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("reply_echo: send_smb failed.\n"); } DEBUG(3,("echo %d times\n", smb_reverb)); @@ -4552,7 +4554,8 @@ int reply_readbmpx(connection_struct *conn, char *inbuf,char *outbuf,int length, SSVAL(outbuf,smb_vwv6,nread); SSVAL(outbuf,smb_vwv7,smb_offset(data,outbuf)); - send_smb(smbd_server_fd(),outbuf); + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("reply_readbmpx: send_smb failed.\n"); total_read += nread; startpos += nread; @@ -4650,7 +4653,8 @@ int reply_writebmpx(connection_struct *conn, char *inbuf,char *outbuf, int size, if (write_through && tcount==nwritten) { /* we need to send both a primary and a secondary response */ smb_setlen(outbuf,outsize - 4); - send_smb(smbd_server_fd(),outbuf); + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("reply_writebmpx: send_smb failed.\n"); /* now the secondary */ outsize = set_message(outbuf,1,0,True); |