summaryrefslogtreecommitdiff
path: root/source3/smbd/ipc.c
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2000-10-11 05:31:39 +0000
committerHerb Lewis <herb@samba.org>2000-10-11 05:31:39 +0000
commit8719c27726d3412edd0781beb956f48f76a62fb6 (patch)
tree4946f7b6d6159eb566ff279d9ccba1f6d901e0e1 /source3/smbd/ipc.c
parentc72f94dad9639bc241890aad338ae0bea8eed84d (diff)
downloadsamba-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/ipc.c')
-rw-r--r--source3/smbd/ipc.c14
1 files changed, 12 insertions, 2 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