summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/srvrec.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-05-20 15:08:21 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-05-20 15:08:21 +0200
commit8194f97685b4af2bbf0cdbdc88fe5332ad147353 (patch)
treebe399ccd85f91426ee72cc2407d75393c0464d4a /apt-pkg/contrib/srvrec.h
parentf106fecc1d7d0250d1d76c2ba837dc0c870c5fff (diff)
add sorting by priority
Diffstat (limited to 'apt-pkg/contrib/srvrec.h')
-rw-r--r--apt-pkg/contrib/srvrec.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
index 583907706..78d238c46 100644
--- a/apt-pkg/contrib/srvrec.h
+++ b/apt-pkg/contrib/srvrec.h
@@ -21,8 +21,9 @@ class SrvRec
u_int16_t weight;
u_int16_t port;
- // see rfc-2782
- //int random;
+ bool operator<(SrvRec const &other) const {
+ return this->priority < other.priority;
+ }
};
bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result);