]> git.saurik.com Git - apt.git/blobdiff - methods/https.cc
do not crash on SIGPIPE in pkgDPkgPM::RunScriptsWithPkgs()
[apt.git] / methods / https.cc
index b0c7ee71d76c149c865c3448105c9434cc042008..c4aff8f38f09fd9f0557498d81f85b3ea956a5cd 100644 (file)
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/netrc.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/netrc.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/strutl.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <unistd.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <unistd.h>
-#include <signal.h>
 #include <stdio.h>
 #include <stdio.h>
-#include <errno.h>
-#include <string.h>
 #include <iostream>
 #include <sstream>
 #include <iostream>
 #include <sstream>
+#include <ctype.h>
+#include <stdlib.h>
 
 
-#include "config.h"
 #include "https.h"
 #include "https.h"
+
 #include <apti18n.h>
                                                                        /*}}}*/
 using namespace std;
 #include <apti18n.h>
                                                                        /*}}}*/
 using namespace std;
@@ -83,9 +84,9 @@ HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp)
    return size*nmemb;
 }
 
    return size*nmemb;
 }
 
-int 
-HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, 
-                             double ultotal, double ulnow)
+int
+HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
+                             double /*ultotal*/, double /*ulnow*/)
 {
    HttpsMethod *me = (HttpsMethod *)clientp;
    if(dltotal > 0 && me->Res.Size == 0) {
 {
    HttpsMethod *me = (HttpsMethod *)clientp;
    if(dltotal > 0 && me->Res.Size == 0) {
@@ -95,7 +96,7 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow,
 }
 
 // HttpsServerState::HttpsServerState - Constructor                    /*{{{*/
 }
 
 // HttpsServerState::HttpsServerState - Constructor                    /*{{{*/
-HttpsServerState::HttpsServerState(URI Srv,HttpsMethod *Owner) : ServerState(Srv, NULL)
+HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * /*Owner*/) : ServerState(Srv, NULL)
 {
    TimeOut = _config->FindI("Acquire::https::Timeout",TimeOut);
    Reset();
 {
    TimeOut = _config->FindI("Acquire::https::Timeout",TimeOut);
    Reset();