Ignore:
Timestamp:
02/13/08 23:23:45 (5 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
c1fe385
Parents:
65ec1fa
Message:

+ Added to NSCA truncates output when to long.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/NSCAAgent/NSCAThread.cpp

    r65ec1fa r9df626c  
    6767  } else { 
    6868    result.result = msg + _T("|") + perf; 
     69    if (result.result.length() >= NSCA_MAX_PLUGINOUTPUT_LENGTH) { 
     70      NSC_LOG_ERROR(_T("NSCA return data truncated")); 
     71      result.result = result.result.substr(0, NSCA_MAX_PLUGINOUTPUT_LENGTH-1); 
     72    } 
    6973  } 
    7074  NSC_LOG_MESSAGE_STD(_T("Result: ") + result.toString()); 
     
    166170    try { 
    167171      for (std::list<Command::Result>::const_iterator cit = results.begin(); cit != results.end(); ++cit) { 
    168         socket.send((*cit).getBuffer(crypt_inst)); 
     172        try { 
     173          socket.send((*cit).getBuffer(crypt_inst)); 
     174        } catch (NSCAPacket::NSCAException &e) { 
     175          NSC_LOG_ERROR_STD(_T("Failed to make command: ") + e.getMessage() ); 
     176        } 
    169177      } 
    170178    } catch (nsca_encrypt::encryption_exception &e) { 
Note: See TracChangeset for help on using the changeset viewer.