Changeset 3baaa4d in nscp for include


Ignore:
Timestamp:
02/17/05 22:41:31 (8 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
db70efa
Parents:
50744c5
Message:

Verified NSCLient compatiblity for many commands and some minor tweaks (now most NSClient commands are OK)

Location:
include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/NSCHelper.cpp

    r55159fd r3baaa4d  
    1414 * @return NSCAPI::success unless the buffer is to short then it will be NSCAPI::invalidBufferLen 
    1515 */ 
    16 int NSCHelper::wrapReturnString(char *buffer, unsigned int bufLen, std::string str) { 
     16int NSCHelper::wrapReturnString(char *buffer, unsigned int bufLen, std::string str, int defaultReturnCode /* = NSCAPI::success */) { 
    1717  if (str.length() > bufLen) 
    1818    return NSCAPI::invalidBufferLen; 
    1919  strncpy(buffer, str.c_str(), bufLen); 
    20   return NSCAPI::success; 
     20  return defaultReturnCode; 
    2121} 
    2222/** 
     
    288288  if (retStr.empty()) 
    289289    return NSCAPI::isfalse; 
    290   return NSCHelper::wrapReturnString(returnBuffer, returnBufferLen, retStr); 
     290  return NSCHelper::wrapReturnString(returnBuffer, returnBufferLen, retStr, NSCAPI::handled); 
    291291} 
    292292/** 
  • include/NSCHelper.h

    r55159fd r3baaa4d  
    77namespace NSCHelper 
    88{ 
    9   int wrapReturnString(char *buffer, unsigned int bufLen, std::string str); 
     9  int wrapReturnString(char *buffer, unsigned int bufLen, std::string str, int defaultReturnCode = NSCAPI::success); 
    1010  std::list<std::string> makelist(const unsigned int argLen, char **argument); 
    1111  std::string translateMessageType(NSCAPI::messageTypes msgType); 
Note: See TracChangeset for help on using the changeset viewer.