Archive Index
This month's Index
|
Subject: Re: Patch to ticket 228
Re: Patch to ticket 228
From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Wed, 26 Oct 2011 01:06:05 +0200
ons 2011-10-26 klockan 00:05 +0200 skrev Daniel Stenberg:
> I only have one comment left here: 'char ***arg' is a really unfortunate
It may look scary in the prototype, but normal usage would be
const char **methods;
n = libssh2_session_supported_algs(session, type, &methods)
.... methods[0], .... methods[1], ... methods[n]
libssh2_free(session, methods);
which is fairly normal.
using *** in the calling code would surely result in confusion.
Other comments
For consistency libssh2_kex_methods should be turned into a function
Can there really be NULL names within method lists? I do not think so.
kex_get_method_by_name() assumes ->name is always valid and would crash
kex_method_strlen() and kex_method_list() truncates the result if ->name
Regards
_______________________________________________
|