summaryrefslogtreecommitdiffstats
path: root/include/libssh/misc.h
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2011-12-31 02:15:16 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-01-02 12:42:47 +0100
commit558b53a856c5df5efcee70f1ee0aba6cc10fe9ea (patch)
treed5471a5d7718dff967a8f40ea04e9f6c306c8888 /include/libssh/misc.h
parent0764adc82f2e25c77af73c7ffa03c0653694f0e1 (diff)
downloadlibssh-558b53a856c5df5efcee70f1ee0aba6cc10fe9ea.tar.gz
libssh-558b53a856c5df5efcee70f1ee0aba6cc10fe9ea.tar.xz
libssh-558b53a856c5df5efcee70f1ee0aba6cc10fe9ea.zip
session: Cleanup timeout functions and fix packets termination.
It is possible that we get unrelated packets while waiting for termination, thus waiting indefinitely. As a workaround we have to check the user-supplied timeout. Also cleaned up ssh_blocking_flush, which was using the timeout in a bogus manner (resetting the timeout after each check).
Diffstat (limited to 'include/libssh/misc.h')
-rw-r--r--include/libssh/misc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libssh/misc.h b/include/libssh/misc.h
index f19dc00f..6812b0c2 100644
--- a/include/libssh/misc.h
+++ b/include/libssh/misc.h
@@ -78,6 +78,7 @@ const void *_ssh_list_pop_head(struct ssh_list *list);
#define ssh_list_pop_head(type, ssh_list)\
((type)_ssh_list_pop_head(ssh_list))
+int ssh_make_milliseconds(long sec, long usec);
void ssh_timestamp_init(struct ssh_timestamp *ts);
int ssh_timeout_elapsed(struct ssh_timestamp *ts, int timeout);
int ssh_timeout_update(struct ssh_timestamp *ts, int timeout);