From 0470f648c6512d7a8a6fc5f66e760dfc85f2c8aa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 1 Oct 2014 22:10:46 +0200 Subject: lib/nfs/Connection: add method GetEventLoop() --- src/lib/nfs/Connection.cxx | 2 +- src/lib/nfs/Connection.hxx | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3