diff options
| author | Andreas Schneider <asn@cynapses.org> | 2010-06-17 13:21:22 +0200 |
|---|---|---|
| committer | Andreas Schneider <asn@cynapses.org> | 2010-06-17 13:31:35 +0200 |
| commit | 601081ebb640dde5be89a5bb0385f2e8c7c7d974 (patch) | |
| tree | 72a38562f67c5281cf4ead7301667fbbdfae4c3d | |
| parent | 22d975a24b69040b28396545e046d2334dd4c386 (diff) | |
agent: Use ssh_poll in agent code.
| -rw-r--r-- | libssh/agent.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/agent.c b/libssh/agent.c index bada814c..2cd83684 100644 --- a/libssh/agent.c +++ b/libssh/agent.c @@ -41,7 +41,6 @@ #include <string.h> #include <stdio.h> -#include <poll.h> #include <unistd.h> #ifndef _WIN32 @@ -54,6 +53,7 @@ #include "libssh/buffer.h" #include "libssh/session.h" #include "libssh/keys.h" +#include "libssh/poll.h" /* macro to check for "agent failure" message */ #define agent_failed(x) \ @@ -86,7 +86,7 @@ static size_t atomicio(struct socket *s, void *buf, size_t n, int do_read) { size_t pos = 0; ssize_t res; struct pollfd pfd; - int fd = ssh_socket_get_fd(s); + socket_t fd = ssh_socket_get_fd(s); pfd.fd = fd; pfd.events = do_read ? POLLIN : POLLOUT; @@ -107,7 +107,7 @@ static size_t atomicio(struct socket *s, void *buf, size_t n, int do_read) { #else if (errno == EAGAIN) { #endif - (void) poll(&pfd, 1, -1); + (void) ssh_poll(&pfd, 1, -1); continue; } return 0; |
