summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-29 15:38:48 +0200
committerStefan Metzmacher <metze@samba.org>2009-07-02 09:10:59 +0200
commit8b94eb6cc8b0c63cf0787bd08ad469a72b0331c0 (patch)
tree52af8aba56b2b67dd6526e659ba518f04c8dd08b /source3
parentd73bc83c1921e2659dba27a0afc0b71a1760a5ca (diff)
downloadsamba-8b94eb6cc8b0c63cf0787bd08ad469a72b0331c0.tar.gz
samba-8b94eb6cc8b0c63cf0787bd08ad469a72b0331c0.tar.bz2
samba-8b94eb6cc8b0c63cf0787bd08ad469a72b0331c0.zip
s3:smbd: push nttrans and trans2 responses with no data to the client
For sync replies it's not a problem, as construct_reply() will send the response, but for async replies we would not send the reply to the client. Currently the notify code works arround this manually, so I assume we didn't have a bug here. But the next commits will simplify the notify code. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c8
-rw-r--r--source3/smbd/trans2.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index a08414d0b0..368a1a8f98 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -74,6 +74,14 @@ void send_nt_replies(connection_struct *conn,
__LINE__,__FILE__);
}
show_msg((char *)req->outbuf);
+ if (!srv_send_smb(smbd_server_fd(),
+ (char *)req->outbuf,
+ true, req->seqnum+1,
+ IS_CONN_ENCRYPTED(conn),
+ &req->pcd)) {
+ exit_server_cleanly("send_nt_replies: srv_send_smb failed.");
+ }
+ TALLOC_FREE(req->outbuf);
return;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 28b07527cc..ffa3de5af6 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -712,6 +712,14 @@ void send_trans2_replies(connection_struct *conn,
if(params_to_send == 0 && data_to_send == 0) {
reply_outbuf(req, 10, 0);
show_msg((char *)req->outbuf);
+ if (!srv_send_smb(smbd_server_fd(),
+ (char *)req->outbuf,
+ true, req->seqnum+1,
+ IS_CONN_ENCRYPTED(conn),
+ &req->pcd)) {
+ exit_server_cleanly("send_trans2_replies: srv_send_smb failed.");
+ }
+ TALLOC_FREE(req->outbuf);
return;
}