ipc.c: Fix for large print queue spinning with Win95. Tested it
authorJeremy Allison <jra@samba.org>
Tue, 14 Apr 1998 20:34:02 +0000 (20:34 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 14 Apr 1998 20:34:02 +0000 (20:34 +0000)
here and it seems to work. Will await final confirmation from
clients.
Fix from Eloy Paris for nmbd append log problem.
nmbd.c: Call reopen_logs after optarg processing (as smbd does).
util.c: Fixed Debug1 to open log in append mode if append flag set.
Jeremy.

source/lib/util.c
source/nmbd/nmbd.c
source/smbd/ipc.c

index 01498d9ba581c8b22b4bb76ca809efacd02116d2..76ba4cc37b44bbd8315e65c70b40f27f5276a22f 100644 (file)
@@ -270,7 +270,10 @@ va_dcl
     {
       if (!dbf) {
              int oldumask = umask(022);
-             dbf = fopen(debugf,"w");
+              if(append_log)
+                dbf = fopen(debugf,"a");
+              else
+                dbf = fopen(debugf,"w");
              umask(oldumask);
              if (dbf) {
                      setbuf(dbf,NULL);
index 00662811ee5ed8b1000455bc370693dc4d5936bb..11de593a03be2ed6a62a009ba2ac8137908e802e 100644 (file)
@@ -659,6 +659,8 @@ int main(int argc,char *argv[])
         }
     }
 
+  reopen_logs();
+
   DEBUG(1,("%s netbios nameserver version %s started\n",timestring(),VERSION));
   DEBUG(1,("Copyright Andrew Tridgell 1994-1997\n"));
 
index 7f471c721b153efac393f085d49dd2605822a069..dd173a51ee146d1a26bd53bd7f34ec01bd971f5a 100644 (file)
@@ -280,8 +280,9 @@ static BOOL init_package(struct pack_desc* p, int count, int subcount)
   p->subcount = 0;
   p->curpos = p->format;
   if (i > n) {
+    p->neededlen = i;
     i = n = 0;
-    p->errcode = NERR_BufTooSmall;
+    p->errcode = ERROR_MORE_DATA;
   }
   else
     p->errcode = NERR_Success;