From: Stefan Metzmacher Date: Mon, 29 Jun 2009 13:38:48 +0000 (+0200) Subject: s3:smbd: push nttrans and trans2 responses with no data to the client X-Git-Tag: talloc-2.0.0~812 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b94eb6cc8b0c63cf0787bd08ad469a72b0331c0;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index a08414d0b05..368a1a8f987 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 28b07527cc4..ffa3de5af6f 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; }