www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: sharing knownhosts structures between sessions

Re: sharing knownhosts structures between sessions

From: Nicolas Martyanoff <khaelin_at_gmail.com>
Date: Tue, 10 Dec 2013 17:31:37 +0100

On 2013-12-10 14:16, Daniel Stenberg wrote:
> On Tue, 10 Dec 2013, Nicolas Martyanoff wrote:
>
> > It would be nice to store the last error in the knownhosts structure, making
> > it totally independant from the session structure.
>
> It wouldn't be enough. libssh2 also supports setting up your own functions for
> memory oprations as part of libssh2_session_init_ex() and the knownhost code
> uses that as well - as all libssh2 code does.

So it is an architecture related issue. Error handling and memory allocation
should be encapsulated apart from sessions, with functions to select the error
handler and memory allocator for each session or knownhost structure. It is a
lot of work anyway.

I will go with the empty session trick then.

-- 
Nicolas Martyanoff
http://wandrian.net
khaelin_at_gmail.com
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-12-10

the libssh2 team