Changeset 23c63eb in nscp


Ignore:
Timestamp:
11/16/07 22:32:58 (6 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
5044c09
Parents:
b0ae738
Message:

2007-11-16 MickeM

  • Fixed an NRPE issue I added when I improved the sockets_timeout (now SSL works as well :). + Added sample VBS script and definitions

2007-11-15 MickeM

  • Improved error message when external NRPE command fails.
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • AutoBuild.h

    rb0ae738 r23c63eb  
    33// change the FALSE to TRUE for autoincrement of build number 
    44#define INCREMENT_VERSION TRUE 
    5 #define FILEVER        0,2,7,75 
    6 #define PRODUCTVER     0,2,7,173 
    7 #define STRFILEVER     "0.2.7.75" 
    8 #define STRPRODUCTVER  "0.2.7.173" 
    9 #define STRPRODUCTDATE  "2007-11-14" 
     5#define FILEVER        0,2,7,83 
     6#define PRODUCTVER     0,2,7,181 
     7#define STRFILEVER     "0.2.7.83" 
     8#define STRPRODUCTVER  "0.2.7.181" 
     9#define STRPRODUCTDATE  "2007-11-16" 
    1010#endif // AUTOBUILD_H 
  • NSC.dist

    rb0ae738 r23c63eb  
    163163;nrpe_ok=scripts\ok.bat 
    164164;check_multi_line=scripts\multi_line.bat 
     165;# 
     166;# The sample scripts 
     167;# 
     168;check_long=scripts\long.bat 
     169;check_ok=scripts\ok.bat 
     170;check_nok=scripts\xlong.bat 
     171;check_vbs=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs 
    165172 
    166173 
  • NSClient++.vcproj

    rb0ae738 r23c63eb  
    624624      <Tool 
    625625        Name="VCCustomBuildTool" 
    626         CommandLine="echo Copying dependency DLLs&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y $(InputDir)\dist_dll\*.dll $(InputDir)\Dist\&quot;&#x0D;&#x0A;echo Removing old archive&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\modules\*.pdb&quot;&quot;&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\*.zip&quot;&quot;&#x0D;&#x0A;echo Making archive: 7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;echo Renaming archive&#x0D;&#x0A;postbuild.pl &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot;&#x0D;&#x0A;echo Sending to server&#x0D;&#x0A;echo pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;" 
     626        CommandLine="echo Copying dependency DLLs&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y $(InputDir)\dist_dll\*.dll $(InputDir)\Dist\&quot;&#x0D;&#x0A;echo Copying scripts&#x0D;&#x0A;cmd /c &quot;mkdir &quot;$(TargetDir)\scripts&quot;&quot;&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y &quot;$(InputDir)\scripts&quot; &quot;$(TargetDir)\scripts&quot;&quot;&#x0D;&#x0A;echo Removing old archive&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\modules\*.pdb&quot;&quot;&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\*.zip&quot;&quot;&#x0D;&#x0A;echo Making archive: 7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;echo Renaming archive&#x0D;&#x0A;postbuild.pl &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot;&#x0D;&#x0A;echo Sending to server&#x0D;&#x0A;echo pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;" 
    627627        Outputs="$(InputDir)\Dist\$(ProjectName).zip" 
    628628      /> 
     
    726726      <Tool 
    727727        Name="VCCustomBuildTool" 
    728         CommandLine="echo Copying dependency DLLs&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y $(InputDir)\dist_dll\*.dll $(InputDir)\Dist\&quot;&#x0D;&#x0A;echo Removing old archive&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\modules\*.pdb&quot;&quot;&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\*.zip&quot;&quot;&#x0D;&#x0A;echo Making archive: 7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;echo Renaming archive&#x0D;&#x0A;postbuild.pl &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot;&#x0D;&#x0A;echo Sending to server&#x0D;&#x0A;echo pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;" 
     728        CommandLine="echo Copying dependency DLLs&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y $(InputDir)\dist_dll\*.dll $(InputDir)\Dist\&quot;&#x0D;&#x0A;echo Copying scripts&#x0D;&#x0A;cmd /c &quot;mkdir &quot;$(TargetDir)\scripts&quot;&quot;&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y &quot;$(InputDir)\scripts&quot; &quot;$(TargetDir)\scripts&quot;&quot;&#x0D;&#x0A;echo Removing old archive&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\modules\*.pdb&quot;&quot;&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\*.zip&quot;&quot;&#x0D;&#x0A;echo Making archive: 7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;echo Renaming archive&#x0D;&#x0A;postbuild.pl &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot;&#x0D;&#x0A;echo Sending to server&#x0D;&#x0A;echo pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;" 
    729729        Outputs="$(InputDir)\Dist\$(ProjectName).zip" 
    730730      /> 
     
    829829      <Tool 
    830830        Name="VCCustomBuildTool" 
    831         CommandLine="echo Copying dependency DLLs&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y $(InputDir)\dist_dll\*.dll $(InputDir)\Dist\&quot;&#x0D;&#x0A;echo Removing old archive&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\modules\*.pdb&quot;&quot;&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\*.zip&quot;&quot;&#x0D;&#x0A;echo Making archive: 7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;echo Renaming archive&#x0D;&#x0A;postbuild.pl &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot;&#x0D;&#x0A;echo Sending to server&#x0D;&#x0A;echo pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;" 
     831        CommandLine="echo Copying dependency DLLs&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y $(InputDir)\dist_dll\*.dll $(InputDir)\Dist\&quot;&#x0D;&#x0A;echo Copying scripts&#x0D;&#x0A;cmd /c &quot;mkdir &quot;$(TargetDir)\scripts&quot;&quot;&#x0D;&#x0A;cmd /c &quot;xcopy /Q /Y &quot;$(InputDir)\scripts&quot; &quot;$(TargetDir)\scripts&quot;&quot;&#x0D;&#x0A;echo Removing old archive&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\modules\*.pdb&quot;&quot;&#x0D;&#x0A;cmd /c &quot;del &quot;$(InputDir)\Dist\*.zip&quot;&quot;&#x0D;&#x0A;echo Making archive: 7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;7z.exe a -r -tzip -bd &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot; &quot;$(TargetDir)\*&quot;&#x0D;&#x0A;echo Renaming archive&#x0D;&#x0A;postbuild.pl &quot;$(TargetDir)\$(InputName)-$(PlatformName).zip&quot;&#x0D;&#x0A;echo Sending to server&#x0D;&#x0A;echo pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;pscp.exe &quot;$(TargetDir)\*.zip&quot; mickem@ssl.nakednuns.org:/var/www/files/nightly/&#x0D;&#x0A;" 
    832832        Outputs="$(InputDir)\Dist\$(ProjectName).zip" 
    833833      /> 
  • changelog

    rb0ae738 r23c63eb  
    66 * Add API for rehashing the daemon (or implement it the API is there but does nothing) 
    77 
     82007-11-16 MickeM 
     9 * Fixed an NRPE issue I added when I improved the sockets_timeout (now SSL works as well :). 
     10 + Added sample VBS script and defenitions 
     11 
     122007-11-15 MickeM 
     13 * Improved error message when external NRPE command failes. 
     14 
    8152007-11-14 MickeM 
    916 + Added multi-line output support ( issue #91 ) 
    1017 * Improved error handling for external commands 
    1118 * Fixed an issue with NRPE/NSClient socket-reading (introduced by the socket_timeout) 
     19 + Added an english fallback if "local" language PDH counters fail. 
    1220 
    13212007-11-12 MickeM 
  • include/SSLSocket.cpp

    rb0ae738 r23c63eb  
    6868 
    6969 
    70 bool simpleSSL::sSSL::readAll(simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength /* = 1024*/) { 
    71   // @todo this could be optimized a bit if we want to 
    72   // If only one buffer is needed we could "reuse" the buffer instead of copying it. 
     70bool simpleSSL::sSSL::readAll(simpleSocket::Socket *report_to, simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength /* = 1024*/) { 
    7371  char *tmpBuffer = new char[tmpBufferLength+1]; 
    7472  if (!ssl_) 
     
    7876    buffer.append(tmpBuffer, n); 
    7977  } 
    80   /* 
    81   while (n>0) { 
    82     if (n == tmpBufferLength) { 
    83       // We filled the buffer (There is more to get) 
    84 //      buffer.append(tmpBuffer, n); 
    85       n=SSL_read(ssl_,tmpBuffer,tmpBufferLength); 
    86       break; 
    87     } else { 
    88       // Buffer not full, we got it "all" 
    89 //      buffer.append(tmpBuffer, n); 
    90       break; 
    91     } 
    92   } 
    93   */ 
    9478  delete [] tmpBuffer; 
    95   return n >= 0; 
    96   /* 
    9779  if (n <= 0) { 
    9880    int rc = getError(n); 
    99     if ((rc != SSL_ERROR_WANT_READ) && (rc != SSL_ERROR_WANT_WRITE)) 
    100       throw SSLException("Socket read failed: ", n, rc); 
     81    report_to->printError(__FILE__, __LINE__, "Could not read from socket: " + strEx::itos(rc)); 
     82    return (rc == SSL_ERROR_WANT_READ) || (rc == SSL_ERROR_WANT_WRITE); 
    10183  } 
    102   */ 
     84  return true; 
    10385} 
    10486void simpleSSL::sSSL::send(const char * buf, unsigned int len) { 
  • include/SSLSocket.h

    rb0ae738 r23c63eb  
    227227      context_ = context; 
    228228    } 
    229     bool readAll (simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024); 
     229    bool readAll (simpleSocket::Socket *report_to, simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024); 
    230230    void send(const char * buf, unsigned int len); 
    231231  }; 
     
    259259    virtual bool readAll (simpleSocket::DataBuffer &buffer, unsigned int tmpBufferLength = 1024) { 
    260260      try { 
    261         return ssl.readAll(buffer, tmpBufferLength); 
     261        return ssl.readAll(this, buffer, tmpBufferLength); 
    262262      } catch (simpleSSL::SSLException e) { 
    263263        throw simpleSocket::SocketException(e.getMessage()); 
  • modules/NRPEListener/NRPEListener.cpp

    rb0ae738 r23c63eb  
    328328  } 
    329329  else { 
    330     msg = "NRPE_NT failed to create process, exiting..."; 
     330    msg = "NRPE_NT failed to create process (" + command + "): " + error::lookup::last_error(); 
    331331    result = NSCAPI::returnUNKNOWN; 
    332332    CloseHandle(hChildInR); 
Note: See TracChangeset for help on using the changeset viewer.