diff --git a/README b/README index 2e1ddbe9..9108095d 100644 --- a/README +++ b/README @@ -26,6 +26,9 @@ Version 0.2 Added libssh2_session_methods() to determine what methods were negotiated. + Added libssh2_session_abstract() for retreiving &session->abstract + + Version 0.1 ----------- diff --git a/include/libssh2.h b/include/libssh2.h index b2c58730..2fdcf696 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -43,7 +43,7 @@ #include #define LIBSSH2_VERSION "0.1" -#define LIBSSH2_APINO 200412091407 +#define LIBSSH2_APINO 200412091526 /* Part of every banner, user specified or not */ #define LIBSSH2_SSH_BANNER "SSH-2.0-libssh2_" LIBSSH2_VERSION @@ -216,6 +216,7 @@ typedef struct _LIBSSH2_CHANNEL LIBSSH2_CHANNEL; /* Session API */ LIBSSH2_API LIBSSH2_SESSION *libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)), LIBSSH2_FREE_FUNC((*my_free)), LIBSSH2_REALLOC_FUNC((*my_realloc)), void *abstract); #define libssh2_session_init() libssh2_session_init_ex(NULL, NULL, NULL, NULL) +LIBSSH2_API void **libssh2_session_abstract(LIBSSH2_SESSION *session); LIBSSH2_API void *libssh2_session_callback_set(LIBSSH2_SESSION *session, int cbtype, void *callback); diff --git a/src/session.c b/src/session.c index f33c8ff7..b2d8088d 100644 --- a/src/session.c +++ b/src/session.c @@ -484,3 +484,12 @@ LIBSSH2_API void libssh2_session_methods(LIBSSH2_SESSION *session, char **kex, } } /* }}} */ + +/* {{{ libssh2_session_abstract + * Retreive a pointer to the abstract property + */ +LIBSSH2_API void **libssh2_session_abstract(LIBSSH2_SESSION *session) +{ + return &session->abstract; +} +/* }}} */