Subject: Re: Example suggestion - ssh2_exec.c

Re: Example suggestion - ssh2_exec.c

From: Paulo Caetano <paulo.a.o.caetano_at_gmail.com>
Date: Wed, 23 May 2012 08:24:27 +0100

Hallo.

I've noticed an error in the code I've sent, In line 221, where I've
added a check for the socket creation.

Where I had this:
        if (socket == -1)
                perror("Create socket");

I should have this:
        if (sock == -1)
                perror("Create socket");

I attached a corrected version.

Thanks.
Paulo Caetano

On Thu, May 17, 2012 at 4:31 PM, Paulo Caetano
<paulo.a.o.caetano_at_gmail.com> wrote:
> OK.
>
> Here it goes, then (attached).
>
> Thanks.
> Paulo Caetano
>
> On Thu, May 17, 2012 at 4:06 PM, Peter Stuge <peter_at_stuge.se> wrote:
>> Paulo Caetano wrote:
>>> The code is the same, I've just isolated the channel life cycle &
>>> command execution in a separate function, and added code to read a
>>> list of commands from a file and execute them sequentially.
>>>
>>> If you think this is useful/relevant to add to the examples, I'll
>>> gladly submit it.
>>
>> You'll have to submit it before anyone can say if it is
>> useful/relevant.
>>
>>
>> //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

Received on 2012-05-23