Collapse state flags into single bitmask attribute

This commit is contained in:
Sara Golemon
2005-02-03 05:41:35 +00:00
parent 2c5c54e999
commit a05bf84ecf
6 changed files with 22 additions and 17 deletions

View File

@@ -325,7 +325,7 @@ LIBSSH2_API void libssh2_session_free(LIBSSH2_SESSION *session)
libssh2_channel_forward_cancel(session->listeners);
}
if (session->newkeys) {
if (session->state & LIBSSH2_STATE_NEWKEYS) {
/* hostkey */
if (session->hostkey && session->hostkey->dtor) {
session->hostkey->dtor(session, &session->server_hostkey_abstract);