Changeset dc59b0e in nscp


Ignore:
Timestamp:
09/08/08 07:21:42 (5 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
a34b229
Parents:
bc97cd8
Message:

2008-09-07 MickeM

+ Added sample powershell script as well as a workaround for making them run.

  • Fixed an issue making powershell scripts (and possibly others) not timeout properly. + Added upgrade support to the installer (still need to add support for keeping .ini file so be ware)
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • AutoBuild.h

    rbc97cd8 rdc59b0e  
    33// change the FALSE to TRUE for autoincrement of build number 
    44#define INCREMENT_VERSION TRUE 
    5 #define FILEVER        0,3,3,39 
    6 #define PRODUCTVER     0,3,3,39 
    7 #define STRFILEVER     _T("0.3.3.39") 
    8 #define STRPRODUCTVER  _T("0.3.3.39") 
    9 #define STRPRODUCTDATE  _T("2008-09-05") 
     5#define FILEVER        0,3,4,4 
     6#define PRODUCTVER     0,3,4,4 
     7#define STRFILEVER     _T("0.3.4.4") 
     8#define STRPRODUCTVER  _T("0.3.4.4") 
     9#define STRPRODUCTDATE  _T("2008-09-08") 
    1010#endif // AUTOBUILD_H 
  • NSC.dist

    rc0522cd rdc59b0e  
    185185;check_es_nok=scripts\nok.bat 
    186186;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs 
     187;check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command - 
    187188 
    188189[External Alias] 
  • NSClient++-2005.sln

    rbc97cd8 rdc59b0e  
    188188EndProject 
    189189Global 
     190  GlobalSection(SubversionScc) = preSolution 
     191    Svn-Managed = True 
     192    Manager = AnkhSVN - Subversion Support for Visual Studio 
     193  EndGlobalSection 
    190194  GlobalSection(SolutionConfigurationPlatforms) = preSolution 
    191195    Debug|Any CPU = Debug|Any CPU 
     
    11711175    {6206F046-3D36-4258-BB03-3291A7070117} = {9A087442-7BB2-4CF0-9F58-5D1BC3C32CD2} 
    11721176    {D96F7075-F6CD-4921-B5D8-8488E2D24BDB} = {9A087442-7BB2-4CF0-9F58-5D1BC3C32CD2} 
     1177    {A3CF4E23-1D1B-4D93-A16A-48C52D118560} = {9A087442-7BB2-4CF0-9F58-5D1BC3C32CD2} 
    11731178    {630857C0-6AD8-4CEE-B5F7-CA1DF620CA9A} = {C8DCE3D7-A802-4C5D-ABB1-B478F545B6E5} 
    11741179    {B6D08289-B8AE-4391-9D07-93B22618BE58} = {C8DCE3D7-A802-4C5D-ABB1-B478F545B6E5} 
  • changelog

    rbc97cd8 rdc59b0e  
    44 * Add API for rehashing the daemon (or implement it the API is there but does nothing) 
    55 * Improved socket performance (would be nice if we could be used as a "hub") 
     6 
     72008-09-07 MickeM 
     8 + Added sample powershell script as well as a workaround for making them run. 
     9 * Fixed an issue making powershell scripts (and possibly others) not timeout properly. 
     10 + Added upgrade support to the installer (still need to add support for keeping .ini file so be ware) 
    611 
    7122008-09-06 MickeM 
  • helpers/installer/Product.wxs

    rbc97cd8 rdc59b0e  
    1515  <?if "$(var.PlatForm)" = "x64"?> 
    1616    <?define PlatForm.x64 ?> 
    17     <?define Product.GUID = "2D1374D5-8026-4e58-8F2E-6A3C40444769" ?> 
    18     <?define Package.GUID = "4E50A0E0-AE48-4737-A6A7-07F3A9F94C29" ?> 
    19     <?define Postfix.GUID = "DD5862EE637C" ?> 
     17  <!-- 
     18    <?define Product.GUID = "04239712-E061-4d85-9105-4B79128FF2EF" ?> 
     19    <?define Package.GUID = "E05F419A-6240-49dd-BC60-4103932A3F2E" ?> 
     20      --> 
     21  <?define Product.GUID = "F7F47EFB-9F10-4a62-AFC3-FE7E7124BCB6" ?> 
     22  <?define Package.GUID = "14F6DF05-BA2A-498f-B643-1BD524DF2F34" ?> 
     23  <?define Postfix.GUID = "DD5862EE637C" ?> 
    2024  <?else?> 
    21     <?define Product.GUID = "BD153740-D13B-4432-8D39-EE8D2F100B0A" ?> 
    22     <?define Package.GUID = "93CF1821-AB09-4c77-AA15-DD5862EE637B" ?> 
    23     <?define Postfix.GUID = "DD5862EE637B" ?> 
     25  <!-- 
     26    <?define Product.GUID = "5C8A0ACB-9D0B-4caf-AEA4-079F0E0AE1F2" ?> 
     27    <?define Package.GUID = "9C5E52DA-28B6-4a6c-B6BE-EE507BB9AC0D" ?> 
     28      --> 
     29  <?define Product.GUID = "79A6D271-4AE6-4795-B423-F96210C6F0E9" ?> 
     30  <?define Package.GUID = "EEEA18BE-7D61-43f3-A762-BAED76B8B98C" ?> 
     31  <?define Postfix.GUID = "DD5862EE637B" ?> 
    2432  <?define PlatForm.Win32 ?> 
    2533  <?endif?> 
     
    3543  <?endif?> 
    3644 
    37   <Product Id="$(var.Product.GUID)" Name="NSClient++ ($(var.PlatForm))" Language="1033" Version="0.3.4.0" Manufacturer="MySolutions NORDIC"> 
     45   
     46  <Product Id="$(var.Product.GUID)" Name="NSClient++ ($(var.PlatForm))" Language="1033" Version="0.3.4.0" Manufacturer="MySolutions NORDIC" 
     47           UpgradeCode="0B36E3B7-0042-452d-B376-57E0C07ADDAA"> 
     48     
    3849    <Package Id="$(var.Package.GUID)" Description="A simple windows monitor agent for (amongst others) nagios." 
    3950             Comments="This will appear in the file summary stream." InstallerVersion="200" Compressed="yes"/> 
     51 
     52    <Upgrade Id="0B36E3B7-0042-452d-B376-57E0C07ADDAA"> 
     53      <UpgradeVersion Property="OLDAPPFOUND" IncludeMinimum="yes" Minimum="0.3.0.0" IncludeMaximum="no" Maximum="0.3.4.0"/> 
     54      <UpgradeVersion Property="NEWAPPFOUND" IncludeMinimum="no" Minimum="0.3.4.0"  OnlyDetect="yes"/> 
     55    </Upgrade> 
     56 
    4057    <?ifdef var.PlatForm.Win32?> 
    4158      <Condition Message="x64 bit version not supported (by installer) on Win32 bit platform (get Win32 bit version instead)">NOT VersionNT64</Condition> 
     
    123140      </Feature> 
    124141    </Feature> 
     142 
    125143    <InstallExecuteSequence> 
     144      <RemoveExistingProducts After='InstallInitialize'/> 
     145      <!-- 
     146      <Custom Action='AlreadyUpdated' After='FindRelatedProducts'>PATCHFOUND</Custom> 
     147      --> 
    126148      <!--Custom Action='LaunchFile' After='InstallFinalize'>NOT Installed</Custom--> 
    127149      <Custom Action="install" After='InstallFinalize'/> 
     
    134156    <UIRef Id="WixUI_FeatureTree" /> 
    135157    <UIRef Id="WixUI_ErrorProgressText" /> 
     158 
    136159    <Icon Id="nsclient.exe" SourceFile="$(var.Source)/modules/SysTray.dll" /> 
    137160  </Product> 
  • include/config.h

    rc0522cd rdc59b0e  
    2626 
    2727// Version 
    28 #define SZBETATAG _T(" ") // _T(" RC ")  _T(" BETA ")  
     28//#define SZBETATAG _T(" ") 
     29#define SZBETATAG _T(" RC ")   
     30//#define SZBETATAG _T(" BETA ")  
    2931#define SZVERSION STRPRODUCTVER SZBETATAG STRPRODUCTDATE 
    3032//FILEVER[0] 
  • include/execute_process.hpp

    rbc97cd8 rdc59b0e  
    9191    delete [] cmd; 
    9292    if (processOK) { 
     93      DWORD dwAvail = 0; 
    9394      std::string str; 
    9495      HANDLE handles[2]; 
     
    9798      char *buffer = createBuffer(); 
    9899      for (unsigned int i=0;i<timeout;i++) { 
    99         DWORD dwAvail = 0; 
    100100        if (!::PeekNamedPipe(hChildOutR, NULL, 0, NULL, &dwAvail, NULL)) 
    101101          break; 
     
    110110      CloseHandle(hChildOutW); 
    111111 
    112       str += readFromFile(buffer, hChildOutR); 
     112      dwAvail = 0; 
     113      if (!::PeekNamedPipe(hChildOutR, NULL, 0, NULL, &dwAvail, NULL)) 
     114        NSC_LOG_ERROR_STD(_T("Failed to peek buffer: ") + error::lookup::last_error()); 
     115      if (dwAvail > 0) 
     116        str += readFromFile(buffer, hChildOutR); 
    113117      msg = strEx::string_to_wstring(str); 
    114118      destroyBuffer(buffer); 
  • include/nsclient_session.hpp

    rbc97cd8 rdc59b0e  
    782782            error(__FILEW__, __LINE__, _T("arg2") + msg.arguments[2]); 
    783783            error(__FILEW__, __LINE__, _T("arg3") + msg.arguments[3]); 
    784             ret = handler_->session_inject(msg.arguments[0], msg.arguments[1], strEx::stoc(msg.arguments[2]), msg.arguments[2]==_T("1"), message, perf); 
     784            ret = handler_->session_inject(msg.arguments[0], msg.arguments[1], strEx::stoc(msg.arguments[2]), msg.arguments[3]==_T("1"), message, perf); 
    785785          } catch (...) { 
    786786            message = _T("Unknown exception!"); 
  • modules/CheckEventLog/CheckEventLog-2005.vcproj

    rc0522cd rdc59b0e  
    18161816      > 
    18171817    </Filter> 
    1818     <File 
    1819       RelativePath=".\ReadMe.txt" 
    1820       > 
    1821     </File> 
    18221818  </Files> 
    18231819  <Globals> 
  • modules/CheckEventLog/CheckEventLog.cpp

    rbc97cd8 rdc59b0e  
    604604  if (!bPerfData) 
    605605    query.perfData = false; 
     606  if (query.alias.empty()) 
     607    query.alias = _T("eventlog"); 
    606608  query.runCheck(hit_count, returnCode, message, perf); 
    607609  if ((truncate > 0) && (message.length() > (truncate-4))) 
  • modules/NSClientListener/NSClientListener.cpp

    r3f569d3 rdc59b0e  
    236236      if (perf.empty()) 
    237237        return strEx::wstring_to_string(NSCHelper::translateReturn(ret) + _T("&") + message); 
    238       return strEx::wstring_to_string(NSCHelper::translateReturn(ret) + _T("&") + message + _T("|") + perf); 
     238      return strEx::wstring_to_string(NSCHelper::translateReturn(ret) + _T("&") + message + _T("&") + perf); 
    239239  } 
    240240} 
Note: See TracChangeset for help on using the changeset viewer.