Changeset b21f30b in nscp
- Timestamp:
- 11/10/09 19:49:47 (4 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 2677e15
- Parents:
- b4ab033
- Files:
-
- 5 edited
-
include/settings/settings_ini.hpp (modified) (1 diff)
-
service/NSClient++.cpp (modified) (5 diffs)
-
service/NSClient++.h (modified) (4 diffs)
-
service/StdAfx.h (modified) (2 diffs)
-
service/settings_manager_impl.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/settings/settings_ini.hpp
r773ad32 rb21f30b 4 4 #include <map> 5 5 #include <settings/Settings.h> 6 #include <simpleini/ SimpleIni.h>6 #include <simpleini/simpleini.h> 7 7 #include <error.hpp> 8 8 -
service/NSClient++.cpp
rb4ab033 rb21f30b 25 25 //#ifdef DEBUG 26 26 #include <crtdbg.h> 27 #include "boost/filesystem.hpp"28 27 //#endif 29 28 #endif … … 798 797 } 799 798 */ 799 #ifdef WIN32 800 800 try { 801 801 com_helper_.initialize(); … … 807 807 return false; 808 808 } 809 #endif 809 810 if (boot) { 810 811 try { … … 912 913 } 913 914 } 915 #ifdef WIN32 914 916 LOG_DEBUG_STD(_T("Stopping: COM helper")); 915 917 try { … … 920 922 LOG_ERROR_STD(_T("Unknown exception uniniating COM...")); 921 923 } 924 #endif 922 925 /* 923 926 LOG_DEBUG_STD(_T("Stopping: Socket Helpers")); -
service/NSClient++.h
r773ad32 rb21f30b 28 28 //#include <MutexRW.h> 29 29 #include <map> 30 #ifdef WIN32 30 31 #include <com_helpers.hpp> 32 #endif 31 33 //#include <nsclient_session.hpp> 32 34 #include <boost/thread/thread.hpp> 33 35 #include <boost/thread/locks.hpp> 34 36 #include <boost/thread/shared_mutex.hpp> 35 36 37 37 38 /** … … 108 109 typedef enum log_status {log_unknown, log_looking, log_debug, log_nodebug }; 109 110 log_status debug_; 111 #ifdef WIN32 110 112 com_helper::initialize_com com_helper_; 113 #endif 111 114 /* 112 115 std::auto_ptr<nsclient_session::shared_client_session> shared_client_; … … 192 195 std::wstring Decrypt(std::wstring str, unsigned int algorithm = NSCAPI::encryption_xor); 193 196 197 #ifndef __FILEW__ 198 #define R(x) _T(x) 199 #define __FILEW__ R(__FILE__) 200 #endif 194 201 ////////////////////////////////////////////////////////////////////////// 195 202 // Log macros to simplify logging … … 199 206 #define LOG_ERROR_STD(msg) LOG_ERROR(((std::wstring)msg).c_str()) 200 207 #define LOG_ERROR(msg) \ 201 NSAPIMessage(NSCAPI::error, _ T(__FILE__), __LINE__, msg)208 NSAPIMessage(NSCAPI::error, __FILEW__, __LINE__, msg) 202 209 #define LOG_CRITICAL_STD(msg) LOG_CRITICAL(((std::wstring)msg).c_str()) 203 210 #define LOG_CRITICAL(msg) \ 204 NSAPIMessage(NSCAPI::critical, _ T(__FILE__), __LINE__, msg)211 NSAPIMessage(NSCAPI::critical, __FILEW__, __LINE__, msg) 205 212 #define LOG_MESSAGE_STD(msg) LOG_MESSAGE(((std::wstring)msg).c_str()) 206 213 #define LOG_MESSAGE(msg) \ 207 NSAPIMessage(NSCAPI::log, _ T(__FILE__), __LINE__, msg)214 NSAPIMessage(NSCAPI::log, __FILEW__, __LINE__, msg) 208 215 209 216 #define LOG_DEBUG_STD(msg) LOG_DEBUG(((std::wstring)msg).c_str()) 210 217 #define LOG_DEBUG(msg) \ 211 NSAPIMessage(NSCAPI::debug, _ T(__FILE__), __LINE__, msg)218 NSAPIMessage(NSCAPI::debug, __FILEW__, __LINE__, msg) 212 219 /* 213 220 #define LOG_DEBUG_STD(msg) -
service/StdAfx.h
rb4ab033 rb21f30b 20 20 ***************************************************************************/ 21 21 #pragma once 22 #include <types.hpp> 23 22 24 #ifdef WIN32 23 25 #define _WINSOCKAPI_ … … 48 50 49 51 #include <boost/algorithm/string.hpp> 52 #include <boost/filesystem.hpp> 53 50 54 #ifdef MEMCHECK 51 55 #include <vld.h> -
service/settings_manager_impl.h
rd5356c1 rb21f30b 4 4 #include <settings/Settings.h> 5 5 #include <settings/settings_ini.hpp> 6 #ifdef WIN32 6 7 #include <settings/settings_old.hpp> 7 8 #include <settings/settings_registry.hpp> 9 #endif 8 10 9 11 namespace settings_manager { … … 59 61 Settings::SettingsInterface* create_instance(settings_type type, std::wstring context) { 60 62 get_logger()->debug(__FILEW__, __LINE__, _T("Trying to create: ") + SettingsCore::type_to_string(type) + _T(": ") + context); 63 #ifdef WIN32 61 64 if (type == SettingsCore::old_ini_file) { 62 65 old_ = true; 63 66 return new Settings::OLDSettings(this, context); 64 67 } 68 if (type == SettingsCore::registry) 69 return new Settings::REGSettings(this, context); 70 #endif 65 71 if (type == SettingsCore::ini_file) 66 72 return new Settings::INISettings(this, context); 67 if (type == SettingsCore::registry)68 return new Settings::REGSettings(this, context);69 73 throw SettingsException(_T("Undefined settings type: ") + SettingsCore::type_to_string(type)); 70 74 }
Note: See TracChangeset
for help on using the changeset viewer.








