Explorar o código

* apt-pkg/init.cc:
- init Dir::Log::Terminal
* apt-pkg/deb/dpkgpm.cc:
- only work with term_out if it is not NULL

Michael Vogt %!s(int64=19) %!d(string=hai) anos
pai
achega
608c766dc1
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 4 2
      apt-pkg/deb/dpkgpm.cc
  2. 1 1
      apt-pkg/init.cc

+ 4 - 2
apt-pkg/deb/dpkgpm.cc

@@ -843,12 +843,14 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 
 	 if(stopOnError) 
 	 {
-	    fclose(term_out);
+	    if(term_out)
+	       fclose(term_out);
 	    return false;
 	 }
       }      
    }
-   fclose(term_out);
+   if(term_out)
+      fclose(term_out);
 
    if (RunScripts("DPkg::Post-Invoke") == false)
       return false;

+ 1 - 1
apt-pkg/init.cc

@@ -77,7 +77,7 @@ bool pkgInitConfig(Configuration &Cnf)
 
    // State   
    Cnf.Set("Dir::Log","var/log/apt");
-   Cnf.Set("Dir::Log::Name","term.log");
+   Cnf.Set("Dir::Log::Terminal","term.log");
    
    bool Res = true;