diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-05 10:57:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:20 -0500 |
commit | 43a77ab149f154961113f05296815af50c0274da (patch) | |
tree | 7fa3bcf5f1980627c1cf8e4ac2e05c3a77427f17 /source3 | |
parent | 40f6afcea2dc2341682ce2dc1bc9082342c46d06 (diff) | |
download | samba-43a77ab149f154961113f05296815af50c0274da.tar.gz samba-43a77ab149f154961113f05296815af50c0274da.tar.bz2 samba-43a77ab149f154961113f05296815af50c0274da.zip |
r24242: Remove reply_prep_legacy from api_rpc_trans_reply
(This used to be commit 160f65946af9b3e1609b0efb211edc81514fb36f)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/ipc.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index bea4f77450..3b26ded71f 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -180,9 +180,7 @@ void send_trans_reply_new(struct smb_request *req, Start the first part of an RPC reply which began with an SMBtrans request. ****************************************************************************/ -static BOOL api_rpc_trans_reply(const char *inbuf, - char *outbuf, - smb_np_struct *p) +static void api_rpc_trans_reply(struct smb_request *req, smb_np_struct *p) { BOOL is_data_outstanding; char *rdata = (char *)SMB_MALLOC(p->max_trans_reply); @@ -190,19 +188,21 @@ static BOOL api_rpc_trans_reply(const char *inbuf, if(rdata == NULL) { DEBUG(0,("api_rpc_trans_reply: malloc fail.\n")); - return False; + reply_nterror(req, NT_STATUS_NO_MEMORY); + return; } if((data_len = read_from_pipe( p, rdata, p->max_trans_reply, &is_data_outstanding)) < 0) { SAFE_FREE(rdata); - return False; + api_no_reply(req); + return; } - send_trans_reply(inbuf, outbuf, NULL, 0, rdata, data_len, is_data_outstanding); - + send_trans_reply_new(req, NULL, 0, rdata, data_len, + is_data_outstanding); SAFE_FREE(rdata); - return True; + return; } /**************************************************************************** @@ -338,29 +338,15 @@ static void api_fd_reply(connection_struct *conn, uint16 vuid, DEBUG(10,("api_fd_reply: p:%p max_trans_reply: %d\n", p, p->max_trans_reply)); switch (subcommand) { - case TRANSACT_DCERPCCMD: { - - char *inbuf, *outbuf; - int size, buflength; - - if (!reply_prep_legacy(req, &inbuf, &outbuf, &size, - &buflength)) { - reply_nterror(req, NT_STATUS_NO_MEMORY); - return; - } - + case TRANSACT_DCERPCCMD: /* dce/rpc command */ reply = write_to_pipe(p, data, tdscnt); - if (reply) - reply = api_rpc_trans_reply(inbuf, outbuf, p); - if (!reply) { api_no_reply(req); return; } - reply_post_legacy(req, -1); + api_rpc_trans_reply(req, p); break; - } case TRANSACT_WAITNAMEDPIPEHANDLESTATE: /* Wait Named Pipe Handle state */ api_WNPHS(req, p, params, tpscnt); |