- some tidying up in files.c
authorAndrew Tridgell <tridge@samba.org>
Sun, 16 Aug 1998 06:20:18 +0000 (06:20 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 16 Aug 1998 06:20:18 +0000 (06:20 +0000)
- handle null fsp in DEBUG() at end of reply_ntcreate_and_X(). Jeremy,
  can you fix this properly?

- get snum right in print queue code in ipc.c (it was broken by my
  connections_struct changes).
(This used to be commit b3dd3785751db2d5d0a80ffac9c3df01c9909891)

source3/smbd/files.c
source3/smbd/ipc.c
source3/smbd/nttrans.c

index 66fbaebeb09f0778c745853e7848eae2a982ae14..8f1cefbbb6e407995e1660c40e6955ad55dc23a4 100644 (file)
@@ -223,9 +223,9 @@ void file_init(void)
        {
                struct rlimit rlp;
                getrlimit(RLIMIT_NOFILE, &rlp);
-               /* Set the fd limit to be MAX_OPEN_FILES + 10 to
-                * account for the extra fd we need to read
-                * directories, as well as the log files and standard
+               /* Set the fd limit to be MAX_FNUMS + 10 to
+                * account for the extra fd we need 
+                * as well as the log files and standard
                 * handles etc.  */
                rlp.rlim_cur = (MAX_FNUMS+10>rlp.rlim_max)? 
                        rlp.rlim_max:MAX_FNUMS+10;
index ae225956a23a7c344bf986d89ebf8f8a3a8fe770..be7fb8d8e35f6ed9ea60c8e84630a79e280d9217 100644 (file)
@@ -833,20 +833,19 @@ static BOOL api_DosPrintQGetInfo(connection_struct *conn,
   
   if (snum < 0 || !VALID_SNUM(snum)) return(False);
 
-  if (uLevel==52)
-  {
-    count = get_printerdrivernumber(snum);
-    DEBUG(3,("api_DosPrintQGetInfo: Driver files count: %d\n",count));
+  if (uLevel==52) {
+         count = get_printerdrivernumber(snum);
+         DEBUG(3,("api_DosPrintQGetInfo: Driver files count: %d\n",count));
   } else {
-    count = get_printqueue(SNUM(conn), conn,&queue,&status);
+         count = get_printqueue(snum, conn,&queue,&status);
   }
 
   if (mdrcnt > 0) *rdata = REALLOC(*rdata,mdrcnt);
   desc.base = *rdata;
   desc.buflen = mdrcnt;
   if (init_package(&desc,1,count)) {
-    desc.subcount = count;
-    fill_printq_info(conn,snum,uLevel,&desc,count,queue,&status);
+         desc.subcount = count;
+         fill_printq_info(conn,snum,uLevel,&desc,count,queue,&status);
   }
 
   *rdata_len = desc.usedlen;
index 4778e3a66baf8c2a4302565f389dae6bc3e57c8b..9bfdddf70452bb2405d9fc2f36df2cc5e45a59ff 100644 (file)
@@ -667,7 +667,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
        chain_fsp = fsp;
 
        DEBUG(5,("reply_ntcreate_and_X: open name = %s\n",
-                fsp->fsp_name));
+                fsp?fsp->fsp_name:"NULL"));
 
        return chain_reply(inbuf,outbuf,length,bufsize);
 }