//network connection
messenger = new SimpleMessenger();
- if (messenger->register_entity(entity_name_t::CLIENT())) {
+ if (!messenger->register_entity(entity_name_t::CLIENT())) {
+ messenger->destroy();
+ messenger = NULL;
shutdown();
return -1001;
}
mounted = false;
}
if (client) {
+ client->shutdown();
delete client;
client = NULL;
}
conf = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY, 0);
conf->parse_env(); // environment variables override
conf->apply_changes();
+
+ keyring_init(conf);
}
ret = ceph_create_with_config_impl(cmount, conf);
libceph_init_mutex.Unlock();
extern "C" int ceph_mount(ceph_mount_t *cmount, const char *root)
{
std::string mount_root;
- if (!root)
+ if (root)
mount_root = root;
return cmount->mount(mount_root);
}