1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

Fix build on Windows.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@240 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-03-08 09:54:38 +00:00
parent fad349fecd
commit d3e64a744e
2 changed files with 7 additions and 1 deletions

View File

@@ -425,6 +425,7 @@ struct ssh_message {
struct ssh_channel_request channel_request;
};
#ifndef _WIN32
/* agent.c */
/**
* @brief Create a new ssh agent structure.
@@ -434,13 +435,14 @@ struct ssh_message {
struct agent_struct *agent_new(struct ssh_session *session);
void agent_close(struct agent_struct *agent);
/**
* @brief Free an allocated ssh agent structure.
*
* @param agent The ssh agent structure to free.
*/
void agent_free(struct agent_struct *agent);
#ifndef _WIN32
/**
* @brief Check if the ssh agent is running.
*

View File

@@ -48,7 +48,9 @@ SSH_SESSION *ssh_new(void) {
session->log_indent=0;
session->out_buffer=buffer_new();
session->in_buffer=buffer_new();
#ifndef _WIN32
session->agent=agent_new(session);
#endif /* _WIN32 */
return session;
}
@@ -77,8 +79,10 @@ void ssh_cleanup(SSH_SESSION *session){
// delete all channels
while(session->channels)
channel_free(session->channels);
#ifndef _WIN32
if (session->agent)
agent_free(session->agent);
#endif /* _WIN32 */
if(session->client_kex.methods)
for(i=0;i<10;i++)
if(session->client_kex.methods[i])