diff options
| author | Fabiano Fidêncio <fidencio@redhat.com> | 2015-09-16 22:13:09 +0200 |
|---|---|---|
| committer | Fabiano Fidêncio <fidencio@redhat.com> | 2015-10-12 13:56:21 +0200 |
| commit | b10e72a2920c292f896b62253e2a029476c163d4 (patch) | |
| tree | 86195906b120fe147169c2f679d74056c376d30b /src | |
| parent | 6827275f063f629e0dacc01acbb24ee4e818ae7d (diff) | |
| download | libssh-b10e72a2920c292f896b62253e2a029476c163d4.tar.gz libssh-b10e72a2920c292f896b62253e2a029476c163d4.tar.xz libssh-b10e72a2920c292f896b62253e2a029476c163d4.zip | |
cleanup: use ssh_ prefix in the agent (non-static) functions
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/agent.c | 10 | ||||
| -rw-r--r-- | src/auth.c | 2 | ||||
| -rw-r--r-- | src/session.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/agent.c b/src/agent.c index 922d7530..1cbb9cd5 100644 --- a/src/agent.c +++ b/src/agent.c @@ -143,7 +143,7 @@ static size_t atomicio(struct ssh_agent_struct *agent, void *buf, size_t n, int } } -ssh_agent agent_new(struct ssh_session_struct *session) { +ssh_agent ssh_agent_new(struct ssh_session_struct *session) { ssh_agent agent = NULL; agent = malloc(sizeof(struct ssh_agent_struct)); @@ -205,7 +205,7 @@ int ssh_set_agent_socket(ssh_session session, socket_t fd){ return SSH_OK; } -void agent_close(struct ssh_agent_struct *agent) { +void ssh_agent_close(struct ssh_agent_struct *agent) { if (agent == NULL) { return; } @@ -213,13 +213,13 @@ void agent_close(struct ssh_agent_struct *agent) { ssh_socket_close(agent->sock); } -void agent_free(ssh_agent agent) { +void ssh_agent_free(ssh_agent agent) { if (agent) { if (agent->ident) { ssh_buffer_free(agent->ident); } if (agent->sock) { - agent_close(agent); + ssh_agent_close(agent); ssh_socket_free(agent->sock); } SAFE_FREE(agent); @@ -481,7 +481,7 @@ ssh_key ssh_agent_get_next_ident(struct ssh_session_struct *session, return key; } -int agent_is_running(ssh_session session) { +int ssh_agent_is_running(ssh_session session) { if (session == NULL || session->agent == NULL) { return 0; } @@ -771,7 +771,7 @@ int ssh_userauth_agent(ssh_session session, return SSH_AUTH_ERROR; } - if (!agent_is_running(session)) { + if (!ssh_agent_is_running(session)) { return SSH_AUTH_DENIED; } if (!session->agent_state){ diff --git a/src/session.c b/src/session.c index ad1b3a87..c1ef2909 100644 --- a/src/session.c +++ b/src/session.c @@ -92,7 +92,7 @@ ssh_session ssh_new(void) { session->maxchannel = FIRST_CHANNEL; #ifndef _WIN32 - session->agent = agent_new(session); + session->agent = ssh_agent_new(session); if (session->agent == NULL) { goto err; } @@ -222,7 +222,7 @@ void ssh_free(ssh_session session) { crypto_free(session->next_crypto); #ifndef _WIN32 - agent_free(session->agent); + ssh_agent_free(session->agent); #endif /* _WIN32 */ ssh_key_free(session->srv.dsa_key); |
