Changeset bc97cd8 in nscp for modules/SysTray/SysTray.cpp


Ignore:
Timestamp:
09/06/08 20:51:13 (5 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
dc59b0e
Parents:
c0522cd
Message:

2008-09-06 MickeM

  • Improved error reporting in the eventlogchecker
  • *BREAKING CHANGE* filter=new is now the default so unless you use the new filtering you need to specify filter=old instead! I Recommend everyone to stop using the "old" filtering.

2008-09-04 MickeM

  • Fixed issues with new service stuff on NT4 and W2K (should work fine now) + Added some DebugOutput? to service handling features so if you experience tropubel try using sysinternals DebugView? too se logging before the agent startes.
  • Fixed a memory leak in the error formating code

2008-08-24 MickeM

  • Changed NSCA "general problem" error message to be more descriptive.
  • Fixed issue with CheckCPU not returning a valid performance unit (%) see issue #219 for details.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/SysTray/SysTray.cpp

    rc0522cd rbc97cd8  
    4343} 
    4444bool SysTray::loadModule() { 
    45   if (systemInfo::isBelowXP(systemInfo::getOSVersion())) { 
    46     try { 
    47       if ((serviceControll::GetServiceType(SZSERVICENAME)&SERVICE_INTERACTIVE_PROCESS)!=SERVICE_INTERACTIVE_PROCESS) { 
    48         NSC_LOG_ERROR(_T("SysTray is not installed (or it cannot interact with the desktop) SysTray won't be loaded. Run ") SZAPPNAME _T(" SysTray install to change this.")); 
    49         return true; 
    50       } 
    51     } catch (serviceControll::SCException e) { 
     45  if (NSCModuleHelper::getSettingsInt(MAIN_SECTION_TITLE, MAIN_SHARED_SESSION, MAIN_SHARED_SESSION_DEFAULT) == 1) { 
     46    NSC_LOG_ERROR(_T("You have enabled shared session, systray module will not load...")); 
     47    return true; 
     48  } 
     49  try { 
     50    if ((serviceControll::GetServiceType(SZSERVICENAME)&SERVICE_INTERACTIVE_PROCESS)!=SERVICE_INTERACTIVE_PROCESS) { 
    5251      NSC_LOG_ERROR(_T("SysTray is not installed (or it cannot interact with the desktop) SysTray won't be loaded. Run ") SZAPPNAME _T(" SysTray install to change this.")); 
    5352      return true; 
    5453    } 
    55     show(); 
    56   } else { 
    57     NSC_LOG_ERROR(_T("SysTray module is not used on windows XP and above (so you can remove it).")); 
     54  } catch (serviceControll::SCException e) { 
     55    NSC_LOG_ERROR(_T("SysTray is not installed (or it cannot interact with the desktop) SysTray won't be loaded. Run ") SZAPPNAME _T(" SysTray install to change this.")); 
     56    return true; 
    5857  } 
     58  show(); 
    5959  return true; 
    6060} 
Note: See TracChangeset for help on using the changeset viewer.