]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/srvrec.h
use clock() as source for SRV randomness
[apt.git] / apt-pkg / contrib / srvrec.h
index e07edc68322377fde5389d25c96021eb15105773..2adad03e9e064383c0a2473de6e6386c9a7ad137 100644 (file)
@@ -26,9 +26,15 @@ class SrvRec
    int random_number_range_end;
    int random_number_range_max;
 
    int random_number_range_end;
    int random_number_range_max;
 
-   bool operator<(SrvRec const &other) const { 
-      return this->priority < other.priority; 
+   bool operator<(SrvRec const &other) const {
+      return this->priority < other.priority;
    }
    }
+
+   SrvRec(std::string const Target, u_int16_t const Priority,
+        u_int16_t const Weight, u_int16_t const Port) :
+      target(Target), priority(Priority), weight(Weight), port(Port),
+      random_number_range_start(0), random_number_range_end(0),
+      random_number_range_max(0) {}
 };
 
 /** \brief Get SRV records from host/port (builds the query string internally) 
 };
 
 /** \brief Get SRV records from host/port (builds the query string internally)