aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-06-17 13:21:22 +0200
committerAndreas Schneider <asn@cynapses.org>2010-06-17 13:21:22 +0200
commit985019ab64b8d07ba41b9d8056831140a8cd2618 (patch)
treea2d843452218ad678dc5ce6e48e3698e9c668483 /libssh
parent870c9a7a08b820e81e9267c5de7eab544bb737d1 (diff)
downloadlibssh-985019ab64b8d07ba41b9d8056831140a8cd2618.tar.gz
libssh-985019ab64b8d07ba41b9d8056831140a8cd2618.tar.xz
libssh-985019ab64b8d07ba41b9d8056831140a8cd2618.zip
agent: Use ssh_poll in agent code.
Diffstat (limited to 'libssh')
-rw-r--r--libssh/agent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/agent.c b/libssh/agent.c
index fb2e463..de9b9e1 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(ssh_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_in(s);
+ socket_t fd = ssh_socket_get_fd_in(s);
pfd.fd = fd;
pfd.events = do_read ? POLLIN : POLLOUT;
@@ -107,7 +107,7 @@ static size_t atomicio(ssh_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;