Alex,
You are so right!!!! :-)
Many Thanks.
> Date: Fri, 25 Sep 2009 08:29:13 +0100
> Subject: Re: using ssh2 on linux shell
> From: sw...@lammy.co.uk
> To: libssh2-devel@cool.haxx.se
>
> 2009/9/25 <bill_m...@hotmail.com>:
> >
> > QString testcmd =ui->lineEdit->text()+"\r\n";
> >
> > libssh2_channel_write(channel,testcmd.toStdString().c_str(),sizeof(testcmd.toStdString().c_str()));
>
> I don't know if this is the source of your problems but I very much
> doubt you should be using sizeof here. sizeof is a *compile* time
> constant and probably returns 1 in this case rather than the length of
> the string (which, I assume, was what you really intended). I image
> you want to use strlen() (or some safer variant) here.
>
> Alex
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.
http://www.microsoft.com/windows/windowslive/products/photos.aspx
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel