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

@@ -180,9 +180,7 @@ struct _LIBSSH2_SESSION {
char *kex_prefs;
char *hostkey_prefs;
int exchanging_keys;
int newkeys;
int authenticated;
int state;
/* Agreed Key Exchange Method */
LIBSSH2_KEX_METHOD *kex;
@@ -233,6 +231,11 @@ struct _LIBSSH2_SESSION {
int err_code;
};
/* session.state bits */
#define LIBSSH2_STATE_EXCHANGING_KEYS 0x00000001
#define LIBSSH2_STATE_NEWKEYS 0x00000002
#define LIBSSH2_STATE_AUTHENTICATED 0x00000004
/* libssh2 extensible ssh api, ultimately I'd like to allow loading additional methods via .so/.dll */
struct _LIBSSH2_KEX_METHOD {