summaryrefslogtreecommitdiff
path: root/netfs/daemon/daemonService.cpp
blob: fe587f134796d59f193568b09ae3bbc894abece8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <pch.hpp>
#include "daemon.h"
#include "daemonService.h"
#include "daemonVolume.h"

ServiceServer::ServiceServer(NetFS::Daemon::ConfigurationPtr c) :
	config(c)
{
}

NetFS::VolumePrx
ServiceServer::connect(const std::string & share, const std::string &, const Ice::Current & ice)
{
	//boost::lock_guard<boost::mutex> lg(lock);
	NetFS::Daemon::ExportMap::iterator e = config->Exports.find(share);
	if (e == config->Exports.end()) {
		throw NetFS::ConfigError();
	}
	return NetFS::VolumePrx::checkedCast(ice.adapter->addWithUUID(new VolumeServer(e->second->RootPath)));
}