Add a define to protect the state machine from older versions of libssh2,

ie 0.14, that don't know about newer constants used in the state machine.
This commit is contained in:
James Housley 2007-06-13 11:27:41 +00:00
Родитель 375cdf89ad
Коммит 3ec7f8a25a
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -234,6 +234,7 @@ static LIBSSH2_FREE_FUNC(libssh2_free)
(void)abstract; (void)abstract;
} }
#if (LIBSSH2_APINO >= 200706012030)
/* /*
* SSH State machine related code * SSH State machine related code
*/ */
@ -674,7 +675,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
CURLcode Curl_ssh_multi_statemach(struct connectdata *conn, CURLcode Curl_ssh_multi_statemach(struct connectdata *conn,
bool *done) bool *done)
{ {
#if 0
curl_socket_t sock = conn->sock[FIRSTSOCKET]; curl_socket_t sock = conn->sock[FIRSTSOCKET];
#endif
int rc = 1; int rc = 1;
struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data;
struct ssh_conn *sshc = &conn->proto.sshc; struct ssh_conn *sshc = &conn->proto.sshc;
@ -711,7 +714,9 @@ CURLcode Curl_ssh_multi_statemach(struct connectdata *conn,
static CURLcode ssh_easy_statemach(struct connectdata *conn) static CURLcode ssh_easy_statemach(struct connectdata *conn)
{ {
#if 0
curl_socket_t sock = conn->sock[FIRSTSOCKET]; curl_socket_t sock = conn->sock[FIRSTSOCKET];
#endif
int rc = 1; int rc = 1;
struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data;
struct ssh_conn *sshc = &conn->proto.sshc; struct ssh_conn *sshc = &conn->proto.sshc;
@ -748,6 +753,7 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn)
return result; return result;
} }
#endif (LIBSSH2_APINO >= 200706012030)
/* /*
* SSH setup and connection * SSH setup and connection