summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-10-22 01:10:10 +0000
committerrandomdan <randomdan@localhost>2010-10-22 01:10:10 +0000
commit6cae29a6090b7216eaff9ce59f0fced57296441d (patch)
treec31c9233a12869f8ecd8244845cdab59ea7a6f01
parentUse the config path given (diff)
downloadnetfs-6cae29a6090b7216eaff9ce59f0fced57296441d.tar.bz2
netfs-6cae29a6090b7216eaff9ce59f0fced57296441d.tar.xz
netfs-6cae29a6090b7216eaff9ce59f0fced57296441d.zip
Initialise the IC after fuse forks, fixes whatever the hell it is that stops it working otherwise
-rw-r--r--netfs/fuse.cpp6
-rw-r--r--netfs/fuse.h2
-rw-r--r--netfs/fuseapp.cpp1
3 files changed, 5 insertions, 4 deletions
diff --git a/netfs/fuse.cpp b/netfs/fuse.cpp
index 1b743f2..b0bfa03 100644
--- a/netfs/fuse.cpp
+++ b/netfs/fuse.cpp
@@ -73,7 +73,6 @@ static void fuseDestroy(void * x)
int
NetFS::opt_parse(void *, const char * arg, int key, struct fuse_args *)
{
- puts(arg);
if (arg[0] == '-') {
return 1;
}
@@ -91,7 +90,8 @@ NetFS::opt_parse(void *, const char * arg, int key, struct fuse_args *)
}
NetFS::NetFS(int & argc, char ** argv) :
- ic(Ice::initialize(argc, argv)),
+ _argc(argc),
+ _argv(argv),
authtok(0)
{
}
@@ -99,7 +99,7 @@ NetFS::NetFS(int & argc, char ** argv) :
void *
NetFS::init(struct fuse_conn_info *)
{
- puts(exportName.c_str());
+ ic = Ice::initialize(_argc, _argv);
FuseConfigPtr fc = FuseConfig::Load(configPath);
FuseConfig::ExportPtr e = fc->exports[exportName];
const std::string & ep = *e->endpoints.begin();
diff --git a/netfs/fuse.h b/netfs/fuse.h
index ede0d2b..bfe9335 100644
--- a/netfs/fuse.h
+++ b/netfs/fuse.h
@@ -42,6 +42,8 @@ class NetFS : public FuseAppBase
int statfs(const char *, struct statvfs *);
// stuff
+ int & _argc;
+ char ** _argv;
Ice::CommunicatorPtr ic;
NetFSComms::FilesPrx files;
diff --git a/netfs/fuseapp.cpp b/netfs/fuseapp.cpp
index 976bc1e..2d24d3e 100644
--- a/netfs/fuseapp.cpp
+++ b/netfs/fuseapp.cpp
@@ -14,7 +14,6 @@ void * FuseAppBase::init(fuse_conn_info*)
}
int FuseAppBase::opt_parse(void*, const char *, int, fuse_args*)
{
- puts("default");
return 1;
}
int FuseAppBase::access(const char *, int)