]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
* apt-inst/deb/debfile.h:
[apt.git] / apt-pkg / acquire.cc
index cdc3fba4b8059994fa3251953d159a102830569b..5e1419056b4f93279e76c46075013a4a509dd1af 100644 (file)
@@ -766,7 +766,7 @@ void pkgAcquire::Queue::Bump()
 // AcquireStatus::pkgAcquireStatus - Constructor                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-pkgAcquireStatus::pkgAcquireStatus() : Update(true), MorePulses(false)
+pkgAcquireStatus::pkgAcquireStatus() : d(NULL), Update(true), MorePulses(false)
 {
    Start();
 }
@@ -872,7 +872,9 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
             << ":"  << (CurrentBytes/float(TotalBytes)*100.0) 
             << ":" << msg 
             << endl;
-      write(fd, status.str().c_str(), status.str().size());
+
+      std::string const dlstatus = status.str();
+      FileFd::Write(fd, dlstatus.c_str(), dlstatus.size());
    }
 
    return true;