#include <ne7ssh_error.h>
Classes | |
struct | Error |
Public Member Functions | |
Ne7sshError () | |
~Ne7sshError () | |
bool | push (int32 channel, const char *format,...) |
const char * | pop () |
const char * | pop (int32 channel) |
bool | deleteCoreMsgs () |
bool | deleteChannel (int32 channel) |
Private Member Functions | |
bool | deleteRecord (uint16 recID) |
Static Private Member Functions | |
static bool | lock () |
static bool | unlock () |
Private Attributes | |
uint16 | memberCount |
char | popedErr [MAX_ERROR_LEN+1] |
struct Ne7sshError::Error ** | ErrorBuffer |
Static Private Attributes | |
static Ne7ssh_Mutex | mut |
Ne7sshError::Ne7sshError | ( | ) |
Ne7sshError constructor.
Ne7sshError::~Ne7sshError | ( | ) |
Ne7sshError destructor.
References ErrorBuffer.
bool Ne7sshError::deleteChannel | ( | int32 | channel | ) |
Removes all error messages within Channel context from the stack.
channel | Specifies the channel error message was bound to. This is ne7ssh library channel, not the receive or send channels used by the transport layer. |
References ErrorBuffer, lock(), and unlock().
Referenced by ne7ssh::close(), and deleteCoreMsgs().
bool Ne7sshError::deleteCoreMsgs | ( | ) |
Removes all error messages within Core context from the stack.
References deleteChannel().
bool Ne7sshError::deleteRecord | ( | uint16 | recID | ) | [private] |
Delete a single error message.
recID | Position within the array. |
References ErrorBuffer.
Referenced by pop().
bool Ne7sshError::lock | ( | ) | [static, private] |
Lock the mutex.
FIXME possible infinite loop
References ne7ssh::errors(), and push().
Referenced by deleteChannel(), pop(), and push().
const char * Ne7sshError::pop | ( | int32 | channel | ) |
Pops an error message from the Channel context.
channel | Specifies the channel error message was bound to. This is ne7ssh library channel, not the receive or send channels used by the transport layer. |
References deleteRecord(), ErrorBuffer, lock(), and unlock().
const char * Ne7sshError::pop | ( | ) |
Pops an error message from the Core context.
bool Ne7sshError::push | ( | int32 | channel, | |
const char * | format, | |||
... | ||||
) |
Pushes a new error message into the stack.
channel | Specifies the channel to bind the error message to. This is ne7ssh library channel, not the receive or send channels used by the transport layer. | |
format | Specifies the error message followed by argument in printf format. The following formatting characters are supported: s,d,i,l,x. Modifier u can be used together with decimal to specify an unsigned variable. Returns null if no there are no erros in the Core context. |
References ErrorBuffer, lock(), and unlock().
Referenced by ne7ssh_string::addFile(), ne7ssh_connection::authWithKey(), ne7ssh_connection::authWithPassword(), Ne7sshSftp::cd(), ne7ssh_connection::checkRemoteVersion(), Ne7sshSftp::chmod(), Ne7sshSftp::chown(), ne7ssh::close(), Ne7sshSftp::closeFile(), ne7ssh_crypt::compute_key(), ne7ssh_crypt::computeH(), ne7ssh::connectWithKey(), ne7ssh::connectWithPassword(), Ne7SftpSubsystem::errorNotInited(), ne7ssh_transport::establish(), ne7ssh_channel::execCmd(), ne7ssh_keys::generateDSAKeys(), ne7ssh_keys::generateDSASignature(), ne7ssh::generateKeyPair(), ne7ssh_keys::generateRSAKeys(), ne7ssh_keys::generateRSASignature(), Ne7sshSftp::get(), ne7ssh::getChannelNo(), ne7ssh_crypt::getCryptAlgo(), ne7ssh_keys::getDSAKeys(), Ne7sshSftp::getFileAttrs(), Ne7sshSftp::getFileHandle(), Ne7sshSftp::getFileSize(), Ne7sshSftp::getFileStats(), Ne7sshSftp::getFStat(), ne7ssh_crypt::getHashAlgo(), ne7ssh_crypt::getHmacAlgo(), ne7ssh_crypt::getKexPublic(), ne7ssh_keys::getKeyPairFromFile(), ne7ssh_crypt::getMacKeyLen(), ne7ssh_keys::getRSAKeys(), Ne7sshSftp::handleData(), ne7ssh_channel::handleData(), ne7ssh_channel::handleDisconnect(), ne7ssh_channel::handleEof(), ne7ssh_channel::handleExtendedData(), ne7ssh_kex::handleInit(), ne7ssh_channel::handleReceived(), ne7ssh_channel::handleRequest(), Ne7sshSftp::handleSftpData(), Ne7sshSftp::handleStatus(), Ne7sshSftp::handleVersion(), ne7ssh::initSftp(), Ne7sshSftp::isType(), lock(), ne7ssh::lock(), Ne7sshSftp::ls(), Ne7sshSftp::mkdir(), Ne7sshSftp::mv(), ne7ssh::ne7ssh(), ne7ssh_crypt::negotiatedCmprsC2s(), ne7ssh_crypt::negotiatedCmprsS2c(), ne7ssh_crypt::negotiatedCryptoC2s(), ne7ssh_crypt::negotiatedCryptoS2c(), ne7ssh_crypt::negotiatedHostkey(), ne7ssh_crypt::negotiatedKex(), ne7ssh_crypt::negotiatedMacC2s(), ne7ssh_crypt::negotiatedMacS2c(), ne7ssh_transport::NoBlock(), ne7ssh_channel::open(), Ne7sshSftp::openDir(), Ne7sshSftp::openFile(), Ne7sshSftp::put(), ne7ssh::read(), ne7ssh::readBinary(), Ne7sshSftp::readFile(), ne7ssh_transport::receive(), Ne7sshSftp::receiveWindowAdjust(), ne7ssh_connection::requestService(), Ne7sshSftp::rm(), Ne7sshSftp::rmdir(), ne7ssh::selectThread(), ne7ssh_transport::send(), ne7ssh::send(), ne7ssh::sendCmd(), ne7ssh_kex::sendInit(), ne7ssh_kex::sendKexDHInit(), ne7ssh_kex::sendKexNewKeys(), ne7ssh_transport::sendPacket(), ne7ssh_connection::startSftp(), unlock(), ne7ssh::unlock(), ne7ssh_crypt::verifySig(), ne7ssh::waitFor(), ne7ssh_transport::waitForPacket(), and Ne7sshSftp::writeFile().
bool Ne7sshError::unlock | ( | ) | [static, private] |
Unlock the mutext.
References ne7ssh::errors(), and push().
Referenced by deleteChannel(), pop(), and push().
struct Ne7sshError::Error ** Ne7sshError::ErrorBuffer [private] |
Structure for storing error messages.
Referenced by deleteChannel(), deleteRecord(), pop(), push(), and ~Ne7sshError().