From f929fbf3e567ca721dba966960f4e471310ebdc7 Mon Sep 17 00:00:00 2001 From: randomdan Date: Thu, 21 Oct 2010 01:20:18 +0000 Subject: Use the config path given --- netfs/fuse.cpp | 2 +- netfs/fuseConfig.cpp | 4 ++-- netfs/fuseConfig.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netfs/fuse.cpp b/netfs/fuse.cpp index 008ba27..1b743f2 100644 --- a/netfs/fuse.cpp +++ b/netfs/fuse.cpp @@ -100,7 +100,7 @@ void * NetFS::init(struct fuse_conn_info *) { puts(exportName.c_str()); - FuseConfigPtr fc = FuseConfig::Load("client.xml"); + FuseConfigPtr fc = FuseConfig::Load(configPath); FuseConfig::ExportPtr e = fc->exports[exportName]; const std::string & ep = *e->endpoints.begin(); diff --git a/netfs/fuseConfig.cpp b/netfs/fuseConfig.cpp index 26ee6a1..ec364cf 100644 --- a/netfs/fuseConfig.cpp +++ b/netfs/fuseConfig.cpp @@ -2,9 +2,9 @@ #include FuseConfigPtr -FuseConfig::Load(const char * path) +FuseConfig::Load(const std::string & path) { - xmlDoc * doc = xmlReadFile(path, NULL, 0); + xmlDoc * doc = xmlReadFile(path.c_str(), NULL, 0); FuseConfigPtr dc = new FuseConfig(doc->children); xmlFreeDoc(doc); return dc; diff --git a/netfs/fuseConfig.h b/netfs/fuseConfig.h index 5416360..f33c8f7 100644 --- a/netfs/fuseConfig.h +++ b/netfs/fuseConfig.h @@ -23,7 +23,7 @@ class FuseConfig : public virtual IntrusivePtrBase { }; FuseConfig(xmlNodePtr); - static boost::intrusive_ptr Load(const char * path); + static boost::intrusive_ptr Load(const std::string & path); ExportMap exports; }; -- cgit v1.2.3