1
1
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@293 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
Andreas Schneider 2009-03-28 21:56:28 +00:00
родитель fce4840c77
Коммит e02a6e0225
6 изменённых файлов: 29 добавлений и 7 удалений

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

@ -58,3 +58,7 @@ if (WITH_SSH1)
set(WITH_SSH1 1) set(WITH_SSH1 1)
endif (WITH_SSH1) endif (WITH_SSH1)
if (WITH_SERVER)
set(WITH_SERVER 1)
endif (WITH_SERVER)

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

@ -1,3 +1,4 @@
option(WITH_LIBZ "Build with ZLIB support" ON) option(WITH_LIBZ "Build with ZLIB support" ON)
option(WITH_SSH1 "Build with SSH1 support" OFF) option(WITH_SSH1 "Build with SSH1 support" OFF)
option(WITH_SERVER "Build with SSH server support" ON)
option(WITH_STATIC_LIB "Build with a static library" OFF) option(WITH_STATIC_LIB "Build with a static library" OFF)

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

@ -65,6 +65,9 @@
/* Define to 1 if you want to enable SSH1 */ /* Define to 1 if you want to enable SSH1 */
#cmakedefine WITH_SSH1 1 #cmakedefine WITH_SSH1 1
/* Define to 1 if you want to enable server support */
#cmakedefine WITH_SERVER 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD #if defined AC_APPLE_UNIVERSAL_BUILD

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

@ -3,18 +3,32 @@ project(libssh-headers C)
set(libssh_HDRS set(libssh_HDRS
libssh.h libssh.h
crypto.h crypto.h
server.h
sftp.h sftp.h
ssh1.h ssh1.h
ssh2.h ssh2.h
) )
INSTALL( install(
FILES FILES
${libssh_HDRS} ${libssh_HDRS}
DESTINATION DESTINATION
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME} ${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
COMPONENT COMPONENT
libraries headers
) )
if (WITH_SERVER)
set(server_HDRS
server.h
)
install(
FILES
${server_HDRS}
DESTINATION
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
COMPONENT
libraries
)
endif (WITH_SERVER)

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

@ -607,7 +607,7 @@ char *sftp_canonicalize_path(SFTP_SESSION *sftp, const char *path);
*/ */
int sftp_server_version(SFTP_SESSION *sftp); int sftp_server_version(SFTP_SESSION *sftp);
#ifndef NO_SERVER #ifdef WITH_SERVER
/** /**
* @brief Create a new sftp server session. * @brief Create a new sftp server session.
* *
@ -627,7 +627,7 @@ SFTP_SESSION *sftp_server_new(SSH_SESSION *session, CHANNEL *chan);
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
int sftp_server_init(SFTP_SESSION *sftp); int sftp_server_init(SFTP_SESSION *sftp);
#endif #endif /* WITH_SERVER */
/* this is not a public interface */ /* this is not a public interface */
#define SFTP_HANDLES 256 #define SFTP_HANDLES 256

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

@ -59,7 +59,7 @@ SFTP_SESSION *sftp_new(SSH_SESSION *session){
return sftp; return sftp;
} }
#ifndef NO_SERVER #ifdef WITH_SERVER
SFTP_SESSION *sftp_server_new(SSH_SESSION *session, CHANNEL *chan){ SFTP_SESSION *sftp_server_new(SSH_SESSION *session, CHANNEL *chan){
SFTP_SESSION *sftp=malloc(sizeof(SFTP_SESSION)); SFTP_SESSION *sftp=malloc(sizeof(SFTP_SESSION));
memset(sftp,0,sizeof(SFTP_SESSION)); memset(sftp,0,sizeof(SFTP_SESSION));
@ -110,7 +110,7 @@ int sftp_server_init(SFTP_SESSION *sftp){
sftp_leave_function(); sftp_leave_function();
return 0; return 0;
} }
#endif #endif /* WITH_SERVER */
void sftp_free(SFTP_SESSION *sftp){ void sftp_free(SFTP_SESSION *sftp){
struct request_queue *ptr; struct request_queue *ptr;