diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-04-16 00:50:49 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-04-16 00:50:49 +0100 |
commit | 6141f0e4c980dca66d42607a24fc8c1910bf6140 (patch) | |
tree | 3d5c1fe0885721690ebaa12f721c87da837a9e33 | |
parent | Prototype listdir (diff) | |
download | netfs-6141f0e4c980dca66d42607a24fc8c1910bf6140.tar.bz2 netfs-6141f0e4c980dca66d42607a24fc8c1910bf6140.tar.xz netfs-6141f0e4c980dca66d42607a24fc8c1910bf6140.zip |
Use facets for all dynamic servants and set the facetId to the version serial
-rw-r--r-- | netfs/daemon/daemonDirectory.cpp | 2 | ||||
-rw-r--r-- | netfs/daemon/daemonFile.cpp | 2 | ||||
-rw-r--r-- | netfs/daemon/daemonService.cpp | 3 | ||||
-rw-r--r-- | netfs/daemon/daemonVolume.cpp | 9 | ||||
-rw-r--r-- | netfs/fuse/fuseDirs.cpp | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/netfs/daemon/daemonDirectory.cpp b/netfs/daemon/daemonDirectory.cpp index 134fde5..399fb86 100644 --- a/netfs/daemon/daemonDirectory.cpp +++ b/netfs/daemon/daemonDirectory.cpp @@ -26,7 +26,7 @@ DirectoryServer::close(const Ice::Current & ice) throw NetFS::SystemError(errno); // LCOV_EXCL_STOP } - ice.adapter->removeFacet(ice.id, "v2"); + ice.adapter->removeAllFacets(ice.id); } NetFS::NameList diff --git a/netfs/daemon/daemonFile.cpp b/netfs/daemon/daemonFile.cpp index 65a418f..e8201c0 100644 --- a/netfs/daemon/daemonFile.cpp +++ b/netfs/daemon/daemonFile.cpp @@ -45,7 +45,7 @@ FileServer::close(const Ice::Current & ice) if (::close(fd) != 0) { throw NetFS::SystemError(errno); } - ice.adapter->remove(ice.id); + ice.adapter->removeAllFacets(ice.id); } NetFS::Buffer diff --git a/netfs/daemon/daemonService.cpp b/netfs/daemon/daemonService.cpp index fe77e5e..be376a0 100644 --- a/netfs/daemon/daemonService.cpp +++ b/netfs/daemon/daemonService.cpp @@ -18,6 +18,7 @@ ServiceServer::connect(const std::string & share, const std::string & authtoken, if (!e->second->AuthToken.empty() && e->second->AuthToken != authtoken) { throw NetFS::AuthError(); } - return NetFS::VolumePrx::checkedCast(ice.adapter->addWithUUID(new VolumeServer(e->second->RootPath, userLookup, groupLookup))); + return NetFS::VolumePrx::uncheckedCast(ice.adapter->addFacetWithUUID( + new VolumeServer(e->second->RootPath, userLookup, groupLookup), "v01")); } diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp index ea5714a..f5e87d8 100644 --- a/netfs/daemon/daemonVolume.cpp +++ b/netfs/daemon/daemonVolume.cpp @@ -242,7 +242,8 @@ VolumeServer::open(const NetFS::ReqEnv & re, const std::string & path, Ice::Int if (fd == -1) { throw NetFS::SystemError(errno); } - return NetFS::FilePrx::checkedCast(ice.adapter->addWithUUID(new FileServer(fd, converter))); + return NetFS::FilePrx::uncheckedCast(ice.adapter->addFacetWithUUID( + new FileServer(fd, converter), "v01")); } NetFS::FilePrx @@ -261,7 +262,8 @@ VolumeServer::create(const NetFS::ReqEnv & re, const std::string & path, Ice::In ::unlink(p.c_str()); throw NetFS::SystemError(errno); } - return NetFS::FilePrx::checkedCast(ice.adapter->addWithUUID(new FileServer(fd, converter))); + return NetFS::FilePrx::uncheckedCast(ice.adapter->addFacetWithUUID( + new FileServer(fd, converter), "v01")); } NetFS::DirectoryPrx @@ -275,7 +277,8 @@ VolumeServer::opendir(const NetFS::ReqEnv & re, const std::string & path, const if (!od) { throw NetFS::SystemError(errno); } - return NetFS::DirectoryPrx::checkedCast(ice.adapter->addFacetWithUUID(new DirectoryServer(od, converter), "v2")); + return NetFS::DirectoryPrx::uncheckedCast(ice.adapter->addFacetWithUUID( + new DirectoryServer(od, converter), "v02")); } void diff --git a/netfs/fuse/fuseDirs.cpp b/netfs/fuse/fuseDirs.cpp index 03cc712..becaa44 100644 --- a/netfs/fuse/fuseDirs.cpp +++ b/netfs/fuse/fuseDirs.cpp @@ -4,7 +4,7 @@ NetFS::FuseApp::OpenDir::OpenDir(DirectoryPrx r, const std::string & p) : remote(r), - remoteV2(r->ice_getFacet() == "v2" ? DirectoryV2Prx::uncheckedCast(r) : nullptr), + remoteV2(r->ice_getFacet() >= "v02" ? DirectoryV2Prx::uncheckedCast(r) : nullptr), path(p) { } |