Hi Marek,

Marek Zizlavsky wrote:
> I hope you can to add to session.c a similar function like:

The way this works is that you send a patch to the mailing list, or
publish your own git tree with your changes committed and send a note
to the list asking for your changes to be pulled.

The patch method is generally prefered because it allows easy
discussion of your suggested changes.


> char *libssh2_banner_get(LIBSSH2_SESSION * session) {
>       if (session->remote.banner)
>             return strdup(session->remote.banner);
>       else
>             return NULL;
> }

What is the motivation for strdup() ? Why not just return
session->remote.banner ?  Should it be cast to char * or unsigned
char * ? What are the legal characters in the banner?

The string will never change during the session so there is no point
in making a copy of it - that will only waste resources and time I
think..


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to