[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problems exchanging data with remote server


Thanks for this patch. I've applied the patch but one chunk failed:

root@cbsdevl3://usr/developers/root/libssh-0.5.0#patch -p1 < patch1.txt
patching file src/channels.c
Hunk #2 succeeded at 885 (offset -8 lines).
Hunk #4 succeeded at 2819 (offset -132 lines).
Hunk #5 FAILED at 2886.
1 out of 5 hunks FAILED -- saving rejects to file src/channels.c.rej

root@cbsdevl3://usr/developers/root/libssh-0.5.0#cat src/channels.c.rej
***************
*** 2866,2872 ****
      goto error;
    }

-   rc = channel_open(channel, "x11", 64000, 32000, payload);

  error:
    ssh_buffer_free(payload);
--- 2886,2896 ----
      goto error;
    }

+   rc = channel_open(channel,
+                     "x11",
+                     CHANNEL_INITIAL_WINDOW,
+                     CHANNEL_MAX_PACKET,
+                     payload);

  error:
    ssh_buffer_free(payload);


As the function ssh_channel_open_x11() does not appear in the libssh v0.5.0 code that I have here locally I take it that this chunk failing isn't a problem.

I've asked our customer to install the updated libssh.so.4.2.0 library that I now have created. I (or a colleague of mine as I will be going on a holiday in 2 days) will let you now the result once we have tested this patch.

Best regards,
Herwin


-----Original Message-----
From: Andreas Schneider [mailto:asn@xxxxxxxxxxxxxx] 
Sent: dinsdag 2 augustus 2011 15:51
To: libssh@xxxxxxxxxx
Subject: Re: Problems exchanging data with remote server

On Tuesday 02 August 2011 15:25:31 you wrote:
> Hi Andreas,
> 
> Thanks for your time and answers. Attached you will find a full debug log of
> the problem, as requested. If you need additional logging or data, please
> let me know.
> 
> I agree with you that even if the packet size of 32000 might not be as per
> specifications, it most likely won't be the cause of problem I'm facing
> here. Is this something that should be corrected on the server side?
> Because I do think it may eventually lead to problems as some of the data
> packets that we receive from the server could easily exceed 64k bytes.

Please test:

http://cpaste.org/1228/

I've looked at the output of openssh. They use 0 as the first window and let 
it grow.
 
> Right now we are just using ssh_channel_write() (of course after we have
> logged in and called ssh_channel_new() and ssh_channel_open_session()).
> Knowing that I am connecting to a 'plain' SSH server that I can connect to
> using the OS ssh command as well, I was thinking that I could try that
> approach with our client program too. Hence my question if using the
> ssh_channel_request_exec() function as a way of issuing commands to the
> server (instead of the ssh_channel_write() function) might yield different
> results.

Normall you need a non-interactive shell:

http://api.libssh.org/master/libssh_tutor_shell.html

or use the exec command:

http://api.libssh.org/master/libssh_tutor_command.html


Cheers,


	-- andreas

-- 
Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn@xxxxxxxxxxxxxx



Follow-Ups:
RE: Problems exchanging data with remote server"Herwin Kleinjan" <herwin.kleinjan@xxxxxxxxxxx>
References:
Re: Problems exchanging data with remote serverAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: Problems exchanging data with remote serverAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org