1
1

Improve ssh_options_set_log_verbosity().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@369 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
Andreas Schneider 2009-04-02 16:33:28 +00:00
родитель da65ee4dbb
Коммит 2afc8a4f1c
2 изменённых файлов: 23 добавлений и 11 удалений

Просмотреть файл

@ -325,9 +325,9 @@ int ssh_options_allow_ssh1(SSH_OPTIONS *opt, int allow);
int ssh_options_allow_ssh2(SSH_OPTIONS *opt, int allow);
int ssh_options_set_log_function(SSH_OPTIONS *opt,
void (*callback)(const char *message, SSH_SESSION *session, int verbosity));
int ssh_options_set_log_verbosity(SSH_OPTIONS *opt, int verbosity);
void ssh_options_set_dsa_server_key(SSH_OPTIONS *opt, const char *dsakey);
void ssh_options_set_rsa_server_key(SSH_OPTIONS *opt, const char *rsakey);
void ssh_options_set_log_verbosity(SSH_OPTIONS *opt, int verbosity);
/**
* @brief Set the authentication callback.

Просмотреть файл

@ -740,17 +740,29 @@ int ssh_options_set_log_function(SSH_OPTIONS *opt,
return 0;
}
/** \brief set this session's logging priority
* \param opt options structure
* \param verbosity verbosity of the messages. Every log smaller or equal to verbosity will be shown\n
* SSH_LOG_NOLOG No logging \n
* SSH_LOG_RARE Rare conditions or warnings\n
* SSH_LOG_ENTRY Api-accessible entrypoints\n
* SSH_LOG_PACKET Packet id and size\n
* SSH_LOG_FUNCTIONS function entering and leaving\n
/**
* @brief Set the session logging priority.
*
* @param opt The options structure to use.
*
* @param verbosity The verbosity of the messages. Every log smaller or
* equal to verbosity will be shown\n
* SSH_LOG_NOLOG No logging \n
* SSH_LOG_RARE Rare conditions or warnings\n
* SSH_LOG_ENTRY Api-accessible entrypoints\n
* SSH_LOG_PACKET Packet id and size\n
* SSH_LOG_FUNCTIONS function entering and leaving\n
*
* @return 0 on success, < 0 on error.
*/
void ssh_options_set_log_verbosity(SSH_OPTIONS *opt, int verbosity){
opt->log_verbosity=verbosity;
int ssh_options_set_log_verbosity(SSH_OPTIONS *opt, int verbosity) {
if (opt == NULL) {
return -1;
}
opt->log_verbosity = verbosity;
return 0;
}
/**
* This is a helper for your application to generate the appropriate