Changeset 9111898 in nscp
- Timestamp:
- 08/22/10 09:51:17 (3 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 57a86f3
- Parents:
- 2a1411e
- Files:
-
- 4 edited
-
include/settings/settings_ini.hpp (modified) (1 diff)
-
include/settings/settings_interface_impl.hpp (modified) (1 diff)
-
service/NSClient++.cpp (modified) (1 diff)
-
service/settings_manager_impl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
include/settings/settings_ini.hpp
r291548e r9111898 225 225 return; 226 226 } 227 SI_Error rc = ini.LoadFile(get_file_name().string().c_str()); 227 std::wstring f = get_file_name().string(); 228 get_core()->get_logger()->debug(__FILEW__, __LINE__, _T("Loading: ") + f); 229 SI_Error rc = ini.LoadFile(f.c_str()); 228 230 if (rc < 0) 229 231 throw_SI_error(rc, _T("Failed to load file")); -
include/settings/settings_interface_impl.hpp
r291548e r9111898 492 492 } 493 493 virtual std::wstring get_file_from_context() { 494 return core_->find_file(url_.host + url_.path, DEFAULT_CONF_OLD_LOCATION);494 return core_->find_file(url_.host + url_.path, _T("")); 495 495 } 496 496 ////////////////////////////////////////////////////////////////////////// -
service/NSClient++.cpp
r291548e r9111898 1376 1376 strEx::replace(file, _T("${shared-path}"), getBasePath().string()); 1377 1377 #else 1378 strEx::replace(file, _T("${shared-path}"), _T("/usr/share d/nsclient++"));1378 strEx::replace(file, _T("${shared-path}"), _T("/usr/share/nsclient++")); 1379 1379 #endif 1380 1380 strEx::replace(file, _T("${exe-path}"), getBasePath().string()); -
service/settings_manager_impl.cpp
r291548e r9111898 44 44 settings::instance_raw_ptr NSCSettingsImpl::create_instance(std::wstring key) { 45 45 net::url url = net::parse(key); 46 if (url.host.empty() && url.path.empty()) 47 key = _T(""); 46 48 #ifdef WIN32 47 49 if (url.protocol == _T("old")) { 48 50 old_ = true; 51 if (key.empty()) 52 key = DEFAULT_CONF_OLD_LOCATION; 49 53 return settings::instance_raw_ptr(new settings::OLDSettings(this, key)); 50 } 51 if (url.protocol == _T("registry")) 54 } 55 if (url.protocol == _T("registry")) { 56 if (key.empty()) 57 key = DEFAULT_CONF_REG_LOCATION; 52 58 return settings::instance_raw_ptr(new settings::REGSettings(this, key)); 59 } 53 60 #endif 54 if (url.protocol == _T("ini")) 61 if (url.protocol == _T("ini")) { 62 if (key.empty()) 63 key = DEFAULT_CONF_INI_LOCATION; 55 64 return settings::instance_raw_ptr(new settings::INISettings(this, key)); 65 } 56 66 throw settings::settings_exception(_T("Undefined settings protocol: ") + url.protocol); 57 67 }
Note: See TracChangeset
for help on using the changeset viewer.








