ewmscp  ..
Functions
throwcall::ssh Namespace Reference

Functions

template<typename T , typename ... Args>
void good0 (T call, libsshCommon &handler, const Args &... args)
 
template<typename T , typename t , typename ... Args>
goodval (T call, t goodvalue, libsshCommon &handler, const Args &... args)
 
template<typename T , typename t , typename ... Args>
badval (T call, t badvalue, libsshCommon &handler, const Args &... args)
 

Function Documentation

◆ badval()

template<typename T , typename t , typename ... Args>
T throwcall::ssh::badval ( call,
badvalue,
libsshCommon handler,
const Args &...  args 
)
inline

Definition at line 120 of file libsshCommon.h.

122  {
123  if (__builtin_expect(call == badvalue, false)) {
124  std::ostringstream msg;
125  conCatString(msg, "ssh error ", ssh_get_error(handler.session), " ", args...);
126  handler.reconnectSessions();
127  throw std::runtime_error(msg.str());
128  }
129  return call;
130  };

References throwcall::conCatString(), libsshCommon::reconnectSessions(), and libsshCommon::session.

Referenced by libsshCommon::openSessions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ good0()

template<typename T , typename ... Args>
void throwcall::ssh::good0 ( call,
libsshCommon handler,
const Args &...  args 
)
inline

Definition at line 97 of file libsshCommon.h.

99  {
100  if (__builtin_expect(call != 0, false)) {
101  std::ostringstream msg;
102  conCatString(msg, "ssh error ", ssh_get_error(handler.session), " ", args...);
103  handler.reconnectSessions();
104  throw std::runtime_error(msg.str());
105  }
106  };

References throwcall::conCatString(), libsshCommon::reconnectSessions(), and libsshCommon::session.

Referenced by libsshCommon::openSessions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ goodval()

template<typename T , typename t , typename ... Args>
T throwcall::ssh::goodval ( call,
goodvalue,
libsshCommon handler,
const Args &...  args 
)
inline

Definition at line 108 of file libsshCommon.h.

110  {
111  if (__builtin_expect(call != goodvalue, false)) {
112  std::ostringstream msg;
113  conCatString(msg, "ssh error ", ssh_get_error(handler.session), " ", args...);
114  handler.reconnectSessions();
115  throw std::runtime_error(msg.str());
116  }
117  return call;
118  };

References throwcall::conCatString(), libsshCommon::reconnectSessions(), and libsshCommon::session.

Referenced by libsshCommon::openSessions().

Here is the call graph for this function:
Here is the caller graph for this function:
libsshCommon::session
ssh_session session
Definition: libsshCommon.h:27
errMsg::conCatString
void conCatString(std::ostringstream &msg, const T &begin)
Definition: errMsgQueue.h:134
libsshCommon::reconnectSessions
void reconnectSessions()
Definition: libsshCommon.cpp:98