summaryrefslogtreecommitdiffstats
path: root/libssh/poll.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2010-05-17 11:19:31 +0200
committerAndreas Schneider <asn@cynapses.org>2010-08-25 23:12:26 +0200
commitedc6b2cef276d62034a6dd3f8ef5338e1a467045 (patch)
tree635258053877dc65479f776443a8e4aace4b3225 /libssh/poll.c
parent9590a643ab6d028770964cb27833f6eece094520 (diff)
poll: Added a cleanup function to free the ws2_32 library.
Diffstat (limited to 'libssh/poll.c')
-rw-r--r--libssh/poll.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libssh/poll.c b/libssh/poll.c
index d74216b0..b6b4a430 100644
--- a/libssh/poll.c
+++ b/libssh/poll.c
@@ -63,6 +63,10 @@ void ssh_poll_init(void) {
return;
}
+void ssh_poll_cleanup(void) {
+ return;
+}
+
int ssh_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
return poll((struct pollfd *) fds, nfds, timeout);
}
@@ -234,6 +238,14 @@ void ssh_poll_init(void) {
}
}
+void ssh_poll_cleanup(void) {
+ win_poll = bsd_poll;
+
+ FreeLibrary(hlib);
+
+ hlib = NULL;
+}
+
int ssh_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
return win_poll(fds, nfds, timeout);
}