Changeset b4db89d in nscp


Ignore:
Timestamp:
08/22/10 10:12:56 (3 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
c146f89
Parents:
57a86f3
Message:

*sigh* maybe time to find a propepr dev enviornment for *nix?

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/settings/settings_ini.hpp

    r57a86f3 rb4db89d  
    1515  class INISettings : public settings::SettingsInterfaceImpl { 
    1616  private: 
    17     boost::filesystem::wpath filename_; 
     17    std::wstring filename_; 
    1818    bool is_loaded_; 
    1919    CSimpleIni ini; 
     
    209209    virtual void save() { 
    210210      SettingsInterfaceImpl::save(); 
    211       SI_Error rc = ini.SaveFile(get_file_name().string().c_str()); 
     211      SI_Error rc = ini.SaveFile(get_file_name().c_str()); 
    212212      if (rc < 0) 
    213213        throw_SI_error(rc, _T("Failed to save file")); 
     
    225225        return; 
    226226      } 
    227       std::wstring f = get_file_name().string(); 
     227      std::wstring f = get_file_name(); 
    228228      get_core()->get_logger()->debug(__FILEW__, __LINE__, _T("Loading: ") + f + _T(" from ") + get_context()); 
    229229      SI_Error rc = ini.LoadFile(f.c_str()); 
     
    248248      throw settings_exception(msg + _T(": ") + get_context() + _T(" - ") + error_str); 
    249249    } 
    250     boost::filesystem::wpath get_file_name() { 
     250    std::wstring get_file_name() { 
    251251      if (filename_.empty()) { 
    252252        filename_ = get_file_from_context(); 
    253253        //filename_ = get_core()->get_base() / boost::filesystem::wpath(get_core()->get_boot_string(get_context(), _T("file"), _T("nsclient.ini"))); 
    254         get_core()->get_logger()->debug(__FILEW__, __LINE__, _T("Reading INI settings from: ") + filename_.string()); 
     254        get_core()->get_logger()->debug(__FILEW__, __LINE__, _T("Reading INI settings from: ") + filename_); 
    255255      } 
    256256      return filename_; 
     
    260260    } 
    261261    virtual std::wstring get_info() { 
    262       return _T("INI settings: (") + context_ + _T(", ") + get_file_name().string() + _T(")"); 
     262      return _T("INI settings: (") + context_ + _T(", ") + get_file_name() + _T(")"); 
    263263    } 
    264264 
  • service/NSClient++.cpp

    r9111898 rb4db89d  
    517517 
    518518void NSClientT::load_all_plugins(int mode) { 
    519   boost::filesystem::wpath pluginPath = expand_path(_T("${module-path}")); 
     519  boost::filesystem::wpath pluginPath; 
     520  try { 
     521    pluginPath = expand_path(_T("${module-path}")); 
     522  } catch (std::exception &e) { 
     523    LOG_CRITICAL_STD(_T("Failed to load plugins: ") + to_wstring(e.what()) + _T(" for ") + expand_path(_T("${module-path}"))); 
     524    return; 
     525  } 
    520526  plugin_alias_list_type plugins = find_all_plugins(false); 
    521527  std::pair<std::wstring,std::wstring> v; 
     
    13761382  strEx::replace(file, _T("${shared-path}"), getBasePath().string()); 
    13771383#else 
    1378   strEx::replace(file, _T("${shared-path}"), _T("/usr/share/nsclient++")); 
     1384  strEx::replace(file, _T("${shared-path}"), getBasePath().string()); 
     1385//  strEx::replace(file, _T("${shared-path}"), _T("/usr/share/nsclient++")); 
    13791386#endif 
    13801387  strEx::replace(file, _T("${exe-path}"), getBasePath().string()); 
Note: See TracChangeset for help on using the changeset viewer.