summaryrefslogtreecommitdiff
path: root/src/lib/nfs
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-08-05 18:06:07 +0200
committerMax Kellermann <max@duempel.org>2016-08-05 18:06:07 +0200
commit588303b78def99b851284d46f155c9f8fae67329 (patch)
treec32262fa83d177fa26cf5cb8e46fb34c7dcb7439 /src/lib/nfs
parent36704c5e1868e15e4b2c0b684f99bde6c137e1b3 (diff)
lib/nfs/Manager: add Compare(ManagedConnection, ManagedConnection)
Required for Boost 1.61, which uses that overload in a BOOST_ASSERT().
Diffstat (limited to 'src/lib/nfs')
-rw-r--r--src/lib/nfs/Manager.cxx12
-rw-r--r--src/lib/nfs/Manager.hxx4
2 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/nfs/Manager.cxx b/src/lib/nfs/Manager.cxx
index 6d50cce18..2164b1d07 100644
--- a/src/lib/nfs/Manager.cxx
+++ b/src/lib/nfs/Manager.cxx
@@ -59,6 +59,18 @@ NfsManager::Compare::operator()(const ManagedConnection &a,
return result < 0;
}
+inline bool
+NfsManager::Compare::operator()(const ManagedConnection &a,
+ const ManagedConnection &b) const
+{
+ int result = strcmp(a.GetServer(), b.GetServer());
+ if (result != 0)
+ return result < 0;
+
+ result = strcmp(a.GetExportName(), b.GetExportName());
+ return result < 0;
+}
+
NfsManager::~NfsManager()
{
assert(GetEventLoop().IsInside());
diff --git a/src/lib/nfs/Manager.hxx b/src/lib/nfs/Manager.hxx
index 130c81aca..80acbdfc9 100644
--- a/src/lib/nfs/Manager.hxx
+++ b/src/lib/nfs/Manager.hxx
@@ -64,6 +64,10 @@ class NfsManager final : IdleMonitor {
gcc_pure
bool operator()(const ManagedConnection &a,
const LookupKey b) const;
+
+ gcc_pure
+ bool operator()(const ManagedConnection &a,
+ const ManagedConnection &b) const;
};
/**