summaryrefslogtreecommitdiff
path: root/source3/smbd/blocking.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-09 01:38:54 +0000
committerJeremy Allison <jra@samba.org>2001-06-09 01:38:54 +0000
commitf63ee18c684af33342de2c5757f9fdf0b7d84997 (patch)
tree0115bdef20e84af196e58bfa8fa5ff6795641087 /source3/smbd/blocking.c
parentc7b67c26e2e6d0ba3e881a729bf91e8ba1d9bde7 (diff)
downloadsamba-f63ee18c684af33342de2c5757f9fdf0b7d84997.tar.gz
samba-f63ee18c684af33342de2c5757f9fdf0b7d84997.tar.bz2
samba-f63ee18c684af33342de2c5757f9fdf0b7d84997.zip
*Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew ! Jeremy. (This used to be commit 1b3977c5367a0b713b194f369abd9872ae01ac2a)
Diffstat (limited to 'source3/smbd/blocking.c')
-rw-r--r--source3/smbd/blocking.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index e8dc29f80a..cebad5ce35 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -130,10 +130,11 @@ for fnum = %d, name = %s\n", length, (int)blr->expire_time, lock_timeout,
static void send_blocking_reply(char *outbuf, int outsize)
{
- if(outsize > 4)
- smb_setlen(outbuf,outsize - 4);
+ if(outsize > 4)
+ smb_setlen(outbuf,outsize - 4);
- send_smb(smbd_server_fd(),outbuf);
+ if (!send_smb(smbd_server_fd(),outbuf))
+ exit_server("send_blocking_reply: send_smb failed.\n");
}
/****************************************************************************
@@ -171,15 +172,16 @@ static void reply_lockingX_success(blocking_lock_record *blr)
static void generic_blocking_lock_error(blocking_lock_record *blr, int eclass, int32 ecode)
{
- char *outbuf = OutBuffer;
- char *inbuf = blr->inbuf;
- construct_reply_common(inbuf, outbuf);
+ char *outbuf = OutBuffer;
+ char *inbuf = blr->inbuf;
+ construct_reply_common(inbuf, outbuf);
- if(eclass == 0) /* NT Error. */
- SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
+ if(eclass == 0) /* NT Error. */
+ SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
- ERROR(eclass,ecode);
- send_smb(smbd_server_fd(),outbuf);
+ ERROR(eclass,ecode);
+ if (!send_smb(smbd_server_fd(),outbuf))
+ exit_server("generic_blocking_lock_error: send_smb failed.\n");
}
/****************************************************************************