diff options
author | Herb Lewis <herb@samba.org> | 2000-10-11 05:31:39 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 2000-10-11 05:31:39 +0000 |
commit | 8719c27726d3412edd0781beb956f48f76a62fb6 (patch) | |
tree | 4946f7b6d6159eb566ff279d9ccba1f6d901e0e1 /source3/smbd | |
parent | c72f94dad9639bc241890aad338ae0bea8eed84d (diff) | |
download | samba-8719c27726d3412edd0781beb956f48f76a62fb6.tar.gz samba-8719c27726d3412edd0781beb956f48f76a62fb6.tar.bz2 samba-8719c27726d3412edd0781beb956f48f76a62fb6.zip |
changes to sync with 2.2. tree
.cvsignore remove config.h - not in this directory
include/profile.h profile changes
lib/messages.c added message to return debug level
libsmb/clierror.c cast to get rid of compiler warning
libsmb/smbencrypt.c cast to get rid of compiler warning
profile/profile.c add flush profile stats changes for profile struct
rpc_parse/parse_samr.c fix for compiler warning
rpc_server/srv_samr.c cast to get rid of compiler warning
smbd/ipc.c profile stats
message.c profile stats
smbd/negprot.c profile stats
smbd/nttrans.c profile stats
smbd/trans2.c profile stats
utils/smbcontrol.c new flush stats command
(This used to be commit bbb24daa25dca4e4b6b1f8942cd84ee3aa1bed8e)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/ipc.c | 14 | ||||
-rw-r--r-- | source3/smbd/message.c | 24 | ||||
-rw-r--r-- | source3/smbd/negprot.c | 2 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 66 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 47 |
5 files changed, 134 insertions, 19 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index a8c1502e94..5ade667209 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -374,6 +374,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int int dscnt = SVAL(inbuf,smb_vwv11); int dsoff = SVAL(inbuf,smb_vwv12); int suwcnt = CVAL(inbuf,smb_vwv13); + START_PROFILE(SMBtrans); memset(name, '\0',sizeof(name)); fstrcpy(name,smb_buf(inbuf)); @@ -385,6 +386,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int if (tdscnt) { if((data = (char *)malloc(tdscnt)) == NULL) { DEBUG(0,("reply_trans: data malloc fail for %d bytes !\n", tdscnt)); + END_PROFILE(SMBtrans); return(ERROR(ERRDOS,ERRnomem)); } memcpy(data,smb_base(inbuf)+dsoff,dscnt); @@ -393,6 +395,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int if (tpscnt) { if((params = (char *)malloc(tpscnt)) == NULL) { DEBUG(0,("reply_trans: param malloc fail for %d bytes !\n", tpscnt)); + END_PROFILE(SMBtrans); return(ERROR(ERRDOS,ERRnomem)); } memcpy(params,smb_base(inbuf)+psoff,pscnt); @@ -402,6 +405,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int int i; if((setup = (uint16 *)malloc(suwcnt*sizeof(uint16))) == NULL) { DEBUG(0,("reply_trans: setup malloc fail for %d bytes !\n", (int)(suwcnt * sizeof(uint16)))); + END_PROFILE(SMBtrans); return(ERROR(ERRDOS,ERRnomem)); } for (i=0;i<suwcnt;i++) @@ -437,6 +441,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int free(data); if (setup) free(setup); + END_PROFILE(SMBtrans); return(ERROR(ERRSRV,ERRerror)); } @@ -499,12 +504,17 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int if (close_on_completion) close_cnum(conn,vuid); - if (one_way) + if (one_way) { + END_PROFILE(SMBtrans); return(-1); + } - if (outsize == 0) + if (outsize == 0) { + END_PROFILE(SMBtrans); return(ERROR(ERRSRV,ERRnosupport)); + } + END_PROFILE(SMBtrans); return(outsize); } #undef OLD_NTDOMAIN diff --git a/source3/smbd/message.c b/source3/smbd/message.c index a65539affa..ab3c841d9c 100644 --- a/source3/smbd/message.c +++ b/source3/smbd/message.c @@ -111,11 +111,14 @@ int reply_sends(connection_struct *conn, int len; char *orig,*dest,*msg; int outsize = 0; + START_PROFILE(SMBsends); msgpos = 0; - if (! (*lp_msg_command())) + if (! (*lp_msg_command())) { + END_PROFILE(SMBsends); return(ERROR(ERRSRV,ERRmsgoff)); + } outsize = set_message(outbuf,0,0,True); @@ -138,6 +141,7 @@ int reply_sends(connection_struct *conn, msg_deliver(); + END_PROFILE(SMBsends); return(outsize); } @@ -150,9 +154,12 @@ int reply_sendstrt(connection_struct *conn, { char *orig,*dest; int outsize = 0; + START_PROFILE(SMBsendstrt); - if (! (*lp_msg_command())) + if (! (*lp_msg_command())) { + END_PROFILE(SMBsendstrt); return(ERROR(ERRSRV,ERRmsgoff)); + } outsize = set_message(outbuf,1,0,True); @@ -167,6 +174,7 @@ int reply_sendstrt(connection_struct *conn, DEBUG( 3, ( "SMBsendstrt (from %s to %s)\n", msgfrom, msgto ) ); + END_PROFILE(SMBsendstrt); return(outsize); } @@ -180,9 +188,12 @@ int reply_sendtxt(connection_struct *conn, int len; int outsize = 0; char *msg; + START_PROFILE(SMBsendtxt); - if (! (*lp_msg_command())) + if (! (*lp_msg_command())) { + END_PROFILE(SMBsendtxt); return(ERROR(ERRSRV,ERRmsgoff)); + } outsize = set_message(outbuf,0,0,True); @@ -196,6 +207,7 @@ int reply_sendtxt(connection_struct *conn, DEBUG( 3, ( "SMBsendtxt\n" ) ); + END_PROFILE(SMBsendtxt); return(outsize); } @@ -207,9 +219,12 @@ int reply_sendend(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize) { int outsize = 0; + START_PROFILE(SMBsendend); - if (! (*lp_msg_command())) + if (! (*lp_msg_command())) { + END_PROFILE(SMBsendend); return(ERROR(ERRSRV,ERRmsgoff)); + } outsize = set_message(outbuf,0,0,True); @@ -217,6 +232,7 @@ int reply_sendend(connection_struct *conn, msg_deliver(); + END_PROFILE(SMBsendend); return(outsize); } diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 362d571ff1..1029c8db62 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -340,6 +340,7 @@ int reply_negprot(connection_struct *conn, char *p; int bcc = SVAL(smb_buf(inbuf),-2); int arch = ARCH_ALL; + START_PROFILE(SMBnegprot); p = smb_buf(inbuf)+1; while (p < (smb_buf(inbuf) + bcc)) @@ -437,6 +438,7 @@ int reply_negprot(connection_struct *conn, DEBUG( 5, ( "negprot index=%d\n", choice ) ); + END_PROFILE(SMBnegprot); return(outsize); } diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index f099583e55..67f1a1bc9e 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -650,6 +650,7 @@ static int do_ntcreate_pipe_open(connection_struct *conn, int reply_ntcreate_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { + int result; pstring fname; uint32 flags = IVAL(inbuf,smb_ntcreate_Flags); uint32 desired_access = IVAL(inbuf,smb_ntcreate_DesiredAccess); @@ -675,14 +676,18 @@ int reply_ntcreate_and_X(connection_struct *conn, files_struct *fsp=NULL; char *p = NULL; BOOL stat_open_only = False; + START_PROFILE(SMBntcreateX); /* If it's an IPC, use the pipe handler. */ if (IS_IPC(conn)) { - if (lp_nt_pipe_support()) + if (lp_nt_pipe_support()) { + END_PROFILE(SMBntcreateX); return do_ntcreate_pipe_open(conn,inbuf,outbuf,length,bufsize); - else + } else { + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRbadaccess)); + } } @@ -691,8 +696,10 @@ int reply_ntcreate_and_X(connection_struct *conn, * NT values, as that's what our code is structured to accept. */ - if((smb_ofun = map_create_disposition( create_disposition )) == -1) + if((smb_ofun = map_create_disposition( create_disposition )) == -1) { + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRbadaccess)); + } /* * Get the file name. @@ -705,8 +712,10 @@ int reply_ntcreate_and_X(connection_struct *conn, files_struct *dir_fsp = file_fsp(inbuf,smb_ntcreate_RootDirectoryFid); size_t dir_name_len; - if(!dir_fsp) + if(!dir_fsp) { + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRbadfid)); + } if(!dir_fsp->is_directory) { /* @@ -718,8 +727,10 @@ int reply_ntcreate_and_X(connection_struct *conn, if( fname[0] == ':') { SSVAL(outbuf, smb_flg2, FLAGS2_32_BIT_ERROR_CODES); + END_PROFILE(SMBntcreateX); return(ERROR(0, NT_STATUS_OBJECT_PATH_NOT_FOUND)); } + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRbadfid)); } @@ -744,8 +755,10 @@ int reply_ntcreate_and_X(connection_struct *conn, * with the Win2k unicode bug, but that would be rare. JRA. */ - if(fname_len + dir_name_len >= sizeof(pstring)) + if(fname_len + dir_name_len >= sizeof(pstring)) { + END_PROFILE(SMBntcreateX); return(ERROR(ERRSRV,ERRfilespecs)); + } get_filename(&fname[dir_name_len], inbuf, smb_buf(inbuf)-inbuf, smb_buflen(inbuf),fname_len); @@ -764,8 +777,10 @@ int reply_ntcreate_and_X(connection_struct *conn, if((smb_open_mode = map_share_mode(&stat_open_only, fname, desired_access, share_access, - file_attributes)) == -1) + file_attributes)) == -1) { + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRbadaccess)); + } oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; @@ -800,6 +815,7 @@ int reply_ntcreate_and_X(connection_struct *conn, unix_ERR_class = ERRDOS; unix_ERR_code = ERRbadpath; } + END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } } else { @@ -852,6 +868,7 @@ int reply_ntcreate_and_X(connection_struct *conn, if (create_options & FILE_NON_DIRECTORY_FILE) { restore_case_semantics(file_attributes); SSVAL(outbuf, smb_flg2, FLAGS2_32_BIT_ERROR_CODES); + END_PROFILE(SMBntcreateX); return(ERROR(0, NT_STATUS_FILE_IS_A_DIRECTORY)); } @@ -864,6 +881,7 @@ int reply_ntcreate_and_X(connection_struct *conn, unix_ERR_class = ERRDOS; unix_ERR_code = ERRbadpath; } + END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } #ifdef EROFS @@ -882,6 +900,7 @@ int reply_ntcreate_and_X(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); + END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -894,6 +913,7 @@ int reply_ntcreate_and_X(connection_struct *conn, restore_case_semantics(file_attributes); + END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } } @@ -903,12 +923,14 @@ int reply_ntcreate_and_X(connection_struct *conn, if(conn->vfs_ops.stat(conn,dos_to_unix(fsp->fsp_name, False), &sbuf) != 0) { close_file(fsp,True); restore_case_semantics(file_attributes); + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRnoaccess)); } } else { if (conn->vfs_ops.fstat(fsp,fsp->fd,&sbuf) != 0) { close_file(fsp,False); restore_case_semantics(file_attributes); + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRnoaccess)); } } @@ -921,6 +943,7 @@ int reply_ntcreate_and_X(connection_struct *conn, fmode = FILE_ATTRIBUTE_NORMAL; if (!fsp->is_directory && (fmode & aDIR)) { close_file(fsp,False); + END_PROFILE(SMBntcreateX); return(ERROR(ERRDOS,ERRnoaccess)); } @@ -977,7 +1000,9 @@ int reply_ntcreate_and_X(connection_struct *conn, DEBUG(5,("reply_ntcreate_and_X: fnum = %d, open name = %s\n", fsp->fnum, fsp->fsp_name)); - return chain_reply(inbuf,outbuf,length,bufsize); + result = chain_reply(inbuf,outbuf,length,bufsize); + END_PROFILE(SMBntcreateX); + return result; } /**************************************************************************** @@ -1403,11 +1428,13 @@ int reply_ntcancel(connection_struct *conn, */ int mid = SVAL(inbuf,smb_mid); + START_PROFILE(SMBntcancel); remove_pending_change_notify_requests_by_mid(mid); remove_pending_lock_requests_by_mid(mid); DEBUG(3,("reply_ntcancel: cancel called on mid = %d.\n", mid)); + END_PROFILE(SMBntcancel); return(-1); } @@ -1417,7 +1444,9 @@ int reply_ntcancel(connection_struct *conn, int reply_nttranss(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { + START_PROFILE(SMBnttranss); DEBUG(4,("Ignoring nttranss of length %d\n",length)); + END_PROFILE(SMBnttranss); return(-1); } @@ -1729,6 +1758,7 @@ int reply_nttrans(connection_struct *conn, uint16 function_code = SVAL( inbuf, smb_nt_Function); char *params = NULL, *data = NULL, *setup = NULL; uint32 num_params_sofar, num_data_sofar; + START_PROFILE(SMBnttrans); if(global_oplock_break && (function_code == NT_TRANSACT_CREATE)) { /* @@ -1739,11 +1769,14 @@ int reply_nttrans(connection_struct *conn, due to being in oplock break state.\n" )); push_oplock_pending_smb_message( inbuf, length); + END_PROFILE(SMBnttrans); return -1; } - if (IS_IPC(conn) && (function_code != NT_TRANSACT_CREATE)) + if (IS_IPC(conn) && (function_code != NT_TRANSACT_CREATE)) { + END_PROFILE(SMBnttrans); return (ERROR(ERRSRV,ERRaccess)); + } outsize = set_message(outbuf,0,0,True); @@ -1755,6 +1788,7 @@ due to being in oplock break state.\n" )); if(CVAL(inbuf, smb_wct) != 19 + (setup_count/2)) { DEBUG(2,("Invalid smb_wct %d in nttrans call (should be %d)\n", CVAL(inbuf, smb_wct), 19 + (setup_count/2))); + END_PROFILE(SMBnttrans); return(ERROR(ERRSRV,ERRerror)); } @@ -1770,6 +1804,7 @@ due to being in oplock break state.\n" )); if ((total_parameter_count && !params) || (total_data_count && !data) || (setup_count && !setup)) { DEBUG(0,("reply_nttrans : Out of memory\n")); + END_PROFILE(SMBnttrans); return(ERROR(ERRDOS,ERRnomem)); } @@ -1822,6 +1857,7 @@ due to being in oplock break state.\n" )); free(data); if(setup) free(setup); + END_PROFILE(SMBnttrans); return(ERROR(ERRSRV,ERRerror)); } @@ -1848,34 +1884,46 @@ due to being in oplock break state.\n" )); /* Now we must call the relevant NT_TRANS function */ switch(function_code) { case NT_TRANSACT_CREATE: + START_PROFILE_NESTED(NT_transact_create); outsize = call_nt_transact_create(conn, inbuf, outbuf, length, bufsize, &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_create); break; case NT_TRANSACT_IOCTL: + START_PROFILE_NESTED(NT_transact_ioctl); outsize = call_nt_transact_ioctl(conn, inbuf, outbuf, length, bufsize, &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_ioctl); break; case NT_TRANSACT_SET_SECURITY_DESC: + START_PROFILE_NESTED(NT_transact_set_security_desc); outsize = call_nt_transact_set_security_desc(conn, inbuf, outbuf, length, bufsize, &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_set_security_desc); break; case NT_TRANSACT_NOTIFY_CHANGE: + START_PROFILE_NESTED(NT_transact_notify_change); outsize = call_nt_transact_notify_change(conn, inbuf, outbuf, length, bufsize, &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_notify_change); break; case NT_TRANSACT_RENAME: + START_PROFILE_NESTED(NT_transact_rename); outsize = call_nt_transact_rename(conn, inbuf, outbuf, length, bufsize, &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_rename); break; case NT_TRANSACT_QUERY_SECURITY_DESC: + START_PROFILE_NESTED(NT_transact_query_security_desc); outsize = call_nt_transact_query_security_desc(conn, inbuf, outbuf, length, bufsize, &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_query_security_desc); break; default: /* Error in request */ @@ -1886,6 +1934,7 @@ due to being in oplock break state.\n" )); free(params); if(data) free(data); + END_PROFILE(SMBnttrans); return (ERROR(ERRSRV,ERRerror)); } @@ -1902,6 +1951,7 @@ due to being in oplock break state.\n" )); free(params); if(data) free(data); + END_PROFILE(SMBnttrans); return outsize; /* If a correct response was needed the call_nt_transact_xxxx calls have already sent it. If outsize != -1 then it is returning an error packet. */ diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7df1c09fa0..7e2c25109a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2158,6 +2158,7 @@ int reply_findclose(connection_struct *conn, { int outsize = 0; int dptr_num=SVALS(inbuf,smb_vwv0); + START_PROFILE(SMBfindclose); DEBUG(3,("reply_findclose, dptr_num = %d\n", dptr_num)); @@ -2167,6 +2168,7 @@ int reply_findclose(connection_struct *conn, DEBUG(3,("SMBfindclose dptr_num = %d\n", dptr_num)); + END_PROFILE(SMBfindclose); return(outsize); } @@ -2178,6 +2180,7 @@ int reply_findnclose(connection_struct *conn, { int outsize = 0; int dptr_num= -1; + START_PROFILE(SMBfindnclose); dptr_num = SVAL(inbuf,smb_vwv0); @@ -2191,6 +2194,7 @@ int reply_findnclose(connection_struct *conn, DEBUG(3,("SMB_findnclose dptr_num = %d\n", dptr_num)); + END_PROFILE(SMBfindnclose); return(outsize); } @@ -2201,7 +2205,9 @@ int reply_findnclose(connection_struct *conn, int reply_transs2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { + START_PROFILE(SMBtranss2); DEBUG(4,("Ignoring transs2 of length %d\n",length)); + END_PROFILE(SMBtranss2); return(-1); } @@ -2226,6 +2232,7 @@ int reply_trans2(connection_struct *conn, unsigned int tran_call = SVAL(inbuf, smb_setup0); char *params = NULL, *data = NULL; int num_params, num_params_sofar, num_data, num_data_sofar; + START_PROFILE(SMBtrans2); if(global_oplock_break && (tran_call == TRANSACT2_OPEN)) { /* Queue this open message as we are the process of an @@ -2235,12 +2242,15 @@ int reply_trans2(connection_struct *conn, DEBUGADD(2,( "in oplock break state.\n")); push_oplock_pending_smb_message(inbuf, length); + END_PROFILE(SMBtrans2); return -1; } if (IS_IPC(conn) && (tran_call != TRANSACT2_OPEN) - && (tran_call != TRANSACT2_GET_DFS_REFERRAL)) + && (tran_call != TRANSACT2_GET_DFS_REFERRAL)) { + END_PROFILE(SMBtrans2); return(ERROR(ERRSRV,ERRaccess)); + } outsize = set_message(outbuf,0,0,True); @@ -2248,6 +2258,7 @@ int reply_trans2(connection_struct *conn, is so as a sanity check */ if (suwcnt != 1) { DEBUG(2,("Invalid smb_sucnt in trans2 call\n")); + END_PROFILE(SMBtrans2); return(ERROR(ERRSRV,ERRerror)); } @@ -2259,10 +2270,11 @@ int reply_trans2(connection_struct *conn, if ((total_params && !params) || (total_data && !data)) { DEBUG(2,("Out of memory in reply_trans2\n")); - if(params) - free(params); - if(data) - free(data); + if(params) + free(params); + if(data) + free(data); + END_PROFILE(SMBtrans2); return(ERROR(ERRDOS,ERRnomem)); } @@ -2303,6 +2315,7 @@ int reply_trans2(connection_struct *conn, free(params); if(data) free(data); + END_PROFILE(SMBtrans2); return(ERROR(ERRSRV,ERRerror)); } @@ -2330,67 +2343,89 @@ int reply_trans2(connection_struct *conn, /* Now we must call the relevant TRANS2 function */ switch(tran_call) { case TRANSACT2_OPEN: + START_PROFILE_NESTED(Trans2_open); outsize = call_trans2open(conn, inbuf, outbuf, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_open); break; case TRANSACT2_FINDFIRST: + START_PROFILE_NESTED(Trans2_findfirst); outsize = call_trans2findfirst(conn, inbuf, outbuf, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_findfirst); break; case TRANSACT2_FINDNEXT: + START_PROFILE_NESTED(Trans2_findnext); outsize = call_trans2findnext(conn, inbuf, outbuf, length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_findnext); break; case TRANSACT2_QFSINFO: + START_PROFILE_NESTED(Trans2_qfsinfo); outsize = call_trans2qfsinfo(conn, inbuf, outbuf, length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_qfsinfo); break; case TRANSACT2_SETFSINFO: + START_PROFILE_NESTED(Trans2_setfsinfo); outsize = call_trans2setfsinfo(conn, inbuf, outbuf, length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_setfsinfo); break; case TRANSACT2_QPATHINFO: case TRANSACT2_QFILEINFO: + START_PROFILE_NESTED(Trans2_qpathinfo); outsize = call_trans2qfilepathinfo(conn, inbuf, outbuf, length, bufsize, ¶ms, &data, total_data); + END_PROFILE_NESTED(Trans2_qpathinfo); break; case TRANSACT2_SETPATHINFO: case TRANSACT2_SETFILEINFO: + START_PROFILE_NESTED(Trans2_setpathinfo); outsize = call_trans2setfilepathinfo(conn, inbuf, outbuf, length, bufsize, ¶ms, &data, total_data); + END_PROFILE_NESTED(Trans2_setpathinfo); break; case TRANSACT2_FINDNOTIFYFIRST: + START_PROFILE_NESTED(Trans2_findnotifyfirst); outsize = call_trans2findnotifyfirst(conn, inbuf, outbuf, length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_findnotifyfirst); break; case TRANSACT2_FINDNOTIFYNEXT: + START_PROFILE_NESTED(Trans2_findnotifynext); outsize = call_trans2findnotifynext(conn, inbuf, outbuf, length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_findnotifynext); break; case TRANSACT2_MKDIR: + START_PROFILE_NESTED(Trans2_mkdir); outsize = call_trans2mkdir(conn, inbuf, outbuf, length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_mkdir); break; case TRANSACT2_GET_DFS_REFERRAL: + START_PROFILE_NESTED(Trans2_get_dfs_referral); outsize = call_trans2getdfsreferral(conn,inbuf,outbuf,length, bufsize, ¶ms, &data); + END_PROFILE_NESTED(Trans2_get_dfs_referral); break; default: /* Error in request */ @@ -2399,6 +2434,7 @@ int reply_trans2(connection_struct *conn, free(params); if(data) free(data); + END_PROFILE(SMBtrans2); return (ERROR(ERRSRV,ERRerror)); } @@ -2413,6 +2449,7 @@ int reply_trans2(connection_struct *conn, free(params); if(data) free(data); + END_PROFILE(SMBtrans2); return outsize; /* If a correct response was needed the call_trans2xxx calls have already sent it. If outsize != -1 then it is returning */ |