summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-01 22:10:46 +0200
committerMax Kellermann <max@duempel.org>2014-10-01 22:10:46 +0200
commit0470f648c6512d7a8a6fc5f66e760dfc85f2c8aa (patch)
tree11e267b8f2e483d37371e6805263194fc549b58e
parent777360149d45cc07c40b53a1c1b7ab903b2b8b84 (diff)
lib/nfs/Connection: add method GetEventLoop()
-rw-r--r--src/lib/nfs/Connection.cxx2
-rw-r--r--src/lib/nfs/Connection.hxx4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx
index cd6f1e2ef..c07598189 100644
--- a/src/lib/nfs/Connection.cxx
+++ b/src/lib/nfs/Connection.cxx
@@ -123,7 +123,7 @@ events_to_libnfs(unsigned i)
NfsConnection::~NfsConnection()
{
- assert(SocketMonitor::GetEventLoop().IsInside());
+ assert(GetEventLoop().IsInside());
assert(new_leases.empty());
assert(active_leases.empty());
assert(callbacks.IsEmpty());
diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx
index 4b570513e..020dc6302 100644
--- a/src/lib/nfs/Connection.hxx
+++ b/src/lib/nfs/Connection.hxx
@@ -133,6 +133,10 @@ protected:
virtual void OnNfsConnectionError(Error &&error) = 0;
private:
+ EventLoop &GetEventLoop() {
+ return SocketMonitor::GetEventLoop();
+ }
+
void DestroyContext();
bool MountInternal(Error &error);
void BroadcastMountSuccess();