summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-08-03 14:53:51 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-08-03 14:53:51 +0200
commit608c766dc110493b952a615c3eb82c3cf3ed8b90 (patch)
tree6799da2bc886bcf9b671b094d8f9a0c04a012986 /apt-pkg
parent8da1f029b7544202da68100b22a2901809bf07af (diff)
* apt-pkg/init.cc:
- init Dir::Log::Terminal * apt-pkg/deb/dpkgpm.cc: - only work with term_out if it is not NULL
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
-rw-r--r--apt-pkg/init.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index aa840f85e..94215197c 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/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;
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 2617603ec..cc3c1f01c 100644
--- a/apt-pkg/init.cc
+++ b/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;