diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-03 10:51:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:14 -0500 |
commit | 70496e030fe9918e8732794c81543f26466b9e76 (patch) | |
tree | 051eaa87b5cfa55412f48fef79b9017d7a5116cf /source3 | |
parent | ccd0b815e8640e1a76c8686469a10158c8f30b0a (diff) | |
download | samba-70496e030fe9918e8732794c81543f26466b9e76.tar.gz samba-70496e030fe9918e8732794c81543f26466b9e76.tar.bz2 samba-70496e030fe9918e8732794c81543f26466b9e76.zip |
r24151: Convert call_trans2getdfsreferral to the new API
(This used to be commit 642c58648b2468544e9488cbffe1a8b236949bcc)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/trans2.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index ce52ba9e70..01b1278c2f 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6689,9 +6689,11 @@ static void call_trans2findnotifynext(connection_struct *conn, Reply to a TRANS2_GET_DFS_REFERRAL - Shirish Kalele <kalele@veritas.com>. ****************************************************************************/ -static int call_trans2getdfsreferral(connection_struct *conn, char* inbuf, char* outbuf, int length, int bufsize, - char **pparams, int total_params, char **ppdata, int total_data, - unsigned int max_data_bytes) +static void call_trans2getdfsreferral(connection_struct *conn, + struct smb_request *req, + char **pparams, int total_params, + char **ppdata, int total_data, + unsigned int max_data_bytes) { char *params = *pparams; pstring pathname; @@ -6702,23 +6704,30 @@ static int call_trans2getdfsreferral(connection_struct *conn, char* inbuf, char* DEBUG(10,("call_trans2getdfsreferral\n")); if (total_params < 3) { - return ERROR_NT(NT_STATUS_INVALID_PARAMETER); + reply_nterror(req, NT_STATUS_INVALID_PARAMETER); + return; } max_referral_level = SVAL(params,0); - if(!lp_host_msdfs()) - return ERROR_DOS(ERRDOS,ERRbadfunc); + if(!lp_host_msdfs()) { + reply_doserror(req, ERRDOS, ERRbadfunc); + return; + } - srvstr_pull(inbuf, SVAL(inbuf, smb_flg2), pathname, ¶ms[2], + srvstr_pull(params, req->flags2, pathname, ¶ms[2], sizeof(pathname), total_params - 2, STR_TERMINATE); - if((reply_size = setup_dfs_referral(conn, pathname,max_referral_level,ppdata,&status)) < 0) - return ERROR_NT(status); + if((reply_size = setup_dfs_referral(conn, pathname, max_referral_level, + ppdata,&status)) < 0) { + reply_nterror(req, status); + return; + } - SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_DFS_PATHNAMES); - send_trans2_replies(inbuf, outbuf,bufsize,0,0,*ppdata,reply_size, max_data_bytes); + SSVAL(req->inbuf, smb_flg2, + SVAL(req->inbuf,smb_flg2) | FLAGS2_DFS_PATHNAMES); + send_trans2_replies_new(req,0,0,*ppdata,reply_size, max_data_bytes); - return(-1); + return; } #define LMCAT_SPL 0x53 @@ -6944,11 +6953,10 @@ static int handle_trans2(connection_struct *conn, struct smb_request *req, case TRANSACT2_GET_DFS_REFERRAL: { START_PROFILE(Trans2_get_dfs_referral); - outsize = call_trans2getdfsreferral( - conn, inbuf, outbuf, size, bufsize, - &state->param, state->total_param, - &state->data, state->total_data, - state->max_data_return); + call_trans2getdfsreferral(conn, req, + &state->param, state->total_param, + &state->data, state->total_data, + state->max_data_return); END_PROFILE(Trans2_get_dfs_referral); break; } |