summaryrefslogtreecommitdiff
path: root/source3/smbd/pipes.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-15 07:27:34 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-15 07:27:34 +0000
commit127655cc888ac40332d4e8e5b94aab03f5120aae (patch)
tree871cd3070589cbfbb9bc939125cd3b4d78923eef /source3/smbd/pipes.c
parent37d5ba8eae030ef852ca64181a5f8e5dbdc52079 (diff)
downloadsamba-127655cc888ac40332d4e8e5b94aab03f5120aae.tar.gz
samba-127655cc888ac40332d4e8e5b94aab03f5120aae.tar.bz2
samba-127655cc888ac40332d4e8e5b94aab03f5120aae.zip
this checkin gets rid of the global Files[] array and makes it local
in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands. (This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582)
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r--source3/smbd/pipes.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 2a51e83946..9ec77c08ca 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -44,7 +44,6 @@ extern int Client;
#define VALID_PNUM(pnum) (((pnum) >= 0) && ((pnum) < MAX_OPEN_PIPES))
#define OPEN_PNUM(pnum) (VALID_PNUM(pnum) && Pipes[pnum].open)
-#define PNUM_OK(pnum,c) (OPEN_PNUM(pnum) && (c)==Pipes[pnum].cnum)
/* this macro should always be used to extract an pnum (smb_fid) from
a packet to ensure chaining works correctly */
@@ -84,7 +83,7 @@ int reply_open_pipe_and_X(connection_struct *conn,
if( strequal(fname,pipe_names[i].client_pipe) )
break;
- if ( pipe_names[i].client_pipe == NULL )
+ if (pipe_names[i].client_pipe == NULL)
return(ERROR(ERRSRV,ERRaccess));
/* Strip \PIPE\ off the name. */
@@ -111,7 +110,9 @@ int reply_open_pipe_and_X(connection_struct *conn,
rmode = 1;
}
- SSVAL(outbuf,smb_vwv2, pnum + 0x800); /* mark file handle up into high range */
+ SSVAL(outbuf,smb_vwv2, pnum + PIPE_HANDLE_OFFSET); /* mark file
+ handle up into
+ high range */
SSVAL(outbuf,smb_vwv3,fmode);
put_dos_date3(outbuf,smb_vwv4,mtime);
SIVAL(outbuf,smb_vwv6,size);
@@ -138,12 +139,6 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
char *data;
BOOL ok = False;
-/*
- CHECK_FNUM(fnum,cnum);
- CHECK_READ(fnum);
- CHECK_ERROR(fnum);
-*/
-
set_message(outbuf,12,0,True);
data = smb_buf(outbuf);