Sorry, I don't have ambitions to became a open source developer, so I
tried to ask someone else to do it for me. Maybe I'll try to
participate in future... Using strdup() was only my "safety" idea...

It is not necessary to add "get banner" functionality to libssh2 if
I'm the only person in the universe, that thinks it can be usefull ;-)

Thank you all for your answers
Marek

2009/9/14 Peter Stuge <pe...@stuge.se>:
> 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
>
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to