From 558b53a856c5df5efcee70f1ee0aba6cc10fe9ea Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sat, 31 Dec 2011 02:15:16 +0100 Subject: 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). --- include/libssh/misc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/libssh') 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); -- cgit