Commit Graph

1515 Commits

Author SHA1 Message Date
Guenter Knauf
46792a9fca Added casts to silent compiler warnings. 2011-09-10 16:38:51 +02:00
Guenter Knauf
b5cd8fe120 Fixed uint64_t printf. 2011-09-10 16:29:29 +02:00
Guenter Knauf
8faefc0a8a Fixed macro function signatures. 2011-09-10 15:57:46 +02:00
Guenter Knauf
f9afe854d3 NetWare makefile tweaks. 2011-09-10 15:31:25 +02:00
Guenter Knauf
26a9aca598 Removed unused var. 2011-09-10 15:24:08 +02:00
Guenter Knauf
bff91fe2a0 Added 2 samples not mentioned. 2011-09-10 15:20:06 +02:00
Guenter Knauf
e0e8d3b0b7 Dont build x11 sample with MinGW. 2011-09-10 15:09:38 +02:00
Guenter Knauf
52d24bc9d2 Fixed executable file description. 2011-09-10 14:51:35 +02:00
Guenter Knauf
e399a852b9 Removed unused var. 2011-09-10 14:48:06 +02:00
Guenter Knauf
3fb3ba571b Kill stupid gcc 3.x uninitialized warning. 2011-09-10 14:22:08 +02:00
Guenter Knauf
1f2c1f9e09 Build all examples. 2011-09-10 14:21:05 +02:00
Guenter Knauf
c75ae587c0 More MinGW makefile tweaks.
Renamed *.mingw makefiles to GNUmakefile since GNU make picks these
up automatically, and therefore win32/Makefile removed.
2011-09-10 14:10:45 +02:00
Guenter Knauf
2e12cfaa23 Removed forgotten WINSOCK_VERSION defines. 2011-09-10 13:40:27 +02:00
Daniel Stenberg
7ed53e21fd libssh2_session_startup(3) => libssh2_session_handshake(3)
Propagate for the current function in docs and examples.
libssh2_session_startup() is deprecated.
2011-09-09 23:17:04 +02:00
Daniel Stenberg
7229d989e7 libssh2_banner_set => libssh2_session_banner_get
Marked the old function as deprecated. Added the new name in the correct
name space with the same arguments and functionality.
2011-09-09 23:11:42 +02:00
Daniel Stenberg
f2c21f6f84 new function: libssh2_session_banner_get
Returns the banner from the server handshake

Fixes #226
2011-09-09 23:00:05 +02:00
Daniel Stenberg
a6ebc6f9fd libssh2.h: bump version to 1.4.0 for new function(s) 2011-09-09 22:49:35 +02:00
Daniel Stenberg
87f79f177f remove embedded CVS/svn tags 2011-09-09 16:12:04 +02:00
liuzl
30ac056cb0 API add:libssh2_sftp_get_channel
Return the channel of sftp, then caller can
control the channel's behavior.

Signed-off-by: liuzl <xieepp@gmail.com>
2011-09-09 16:00:11 +02:00
Daniel Stenberg
c45de9176b _libssh2_channel_read: react on errors from receive_window_adjust
Previously the function would ignore all errors except for EAGAIN.
2011-09-09 10:30:43 +02:00
Daniel Stenberg
ff40c58743 sftp_read: extend and clarify the documentation 2011-09-08 23:02:58 +02:00
Daniel Stenberg
10b66cef08 sftp_read: cap the read ahead maximum amount
Now we only go up to LIBSSH2_CHANNEL_WINDOW_DEFAULT*30 bytes SFTP read
ahead, which currently equals 64K*30 == 1966080 bytes.
2011-09-08 22:47:38 +02:00
Daniel Stenberg
81bdcf61f3 _libssh2_channel_read: fix non-blocking window adjusting
If EAGAIN is returned when adjusting the receive window, we must not
read from the transport directly until we've finished the adjusting.
2011-09-08 14:25:25 +02:00
Guenter Knauf
50d451e307 Fix for systems which need sys/select.h. 2011-09-08 13:53:05 +02:00
Guenter Knauf
3f2b1dea5e The files were not gone but renamed ... 2011-09-08 11:59:49 +02:00
Daniel Stenberg
7c9b84d1d1 sftp_read: added documenting comment
Taken from some recent email conversations I added some descriptions of
the logic in sftp_read() to aid readers.
2011-09-06 23:31:07 +02:00
Daniel Stenberg
1ba42ea847 1.3.1: start the work 2011-09-06 23:27:50 +02:00
Daniel Stenberg
507d5f96cf Makefile.am: the Makefile.win32 files are gone 2011-09-06 22:56:06 +02:00
Daniel Stenberg
84d8728835 RELEASE-NOTES: updated for 1.3.0 2011-09-06 22:47:34 +02:00
Daniel Stenberg
296d57bb2c sftp_read: a short read is not end of file
A returned READ packet that is short will now only reduce the
offset.

This is a temporary fix as it is slightly better than the previous
approach but still not very good.
2011-09-06 22:43:26 +02:00
liuzl
9e79031ad7 _libssh2_packet_add: adjust window size when truncating
When receiving more data than what the window size allows on a
particular channel, make sure that the window size is adjusted in that
case too. Previously it would only adjust the window in the non-error
case.
2011-08-31 10:45:12 +02:00
Guenter Knauf
689fc5c596 Silent compiler warning with MinGW64. 2011-08-29 15:30:18 +02:00
Guenter Knauf
31a9e8860d Fixed link to native Win32 awk tool. 2011-08-29 14:05:15 +02:00
Guenter Knauf
b26c3e7cce Renamed MinGW makefiles. 2011-08-29 13:59:43 +02:00
Guenter Knauf
e4eeb85f01 Some MinGW makefile tweaks.
Enable build without GNU tools and with MinGW64 compiler.
2011-08-29 13:54:51 +02:00
Guenter Knauf
7de77e94bf Fixed aes_ctr_do_cipher() signature. 2011-08-29 13:27:46 +02:00
liuzl
8c0294db66 libssh2_sftp_seek64: flush packetlist and buffered data
When seeking to a new position, flush the packetlist and buffered data
to prevent already received or pending data to wrongly get used when
sftp-reading from the new offset within the file.
2011-08-26 13:47:35 +02:00
Daniel Stenberg
900c90ccbe sftp_read: advance offset correctly for buffered copies
In the case where a read packet has been received from the server, but
the entire contents couldn't be copied to the user-buffer, the data is
instead buffered and copied to the user's buffer in the next invocation
of sftp_read(). When that "extra" copy is made, the 'offset' pointer was
not advanced accordingly.

The biggest impact of this flaw was that the 'already' variable at the
top of the function that figures out how much data "ahead" that has
already been asked for would slowly go more and more out of sync, which
could lead to the file not being read all the way to the end.

This problem was most noticable in cases where the application would
only try to read the exact file size amount, like curl does. In the
examples libssh2 provides the sftp read function is most often called
with a fixed size large buffer and then the bug would not appear as
easily.

This bug was introduced in the SFTP rewrite in 1.2.8.

Bug: http://curl.haxx.se/mail/lib-2011-08/0305.html
     http://www.libssh2.org/mail/libssh2-devel-archive-2011-08/0085.shtml
2011-08-26 11:45:48 +02:00
Daniel Stenberg
d5eec4aad9 wrap some long lines < 80 columns 2011-08-25 22:41:17 +02:00
Daniel Stenberg
19864f0f64 LIBSSH2_RECV: fix typo, use the RECV_FD macro 2011-08-25 22:38:46 +02:00
Daniel Stenberg
420f0b7793 subsystem_netconf.c: fix compiler warnings 2011-08-21 15:24:55 +02:00
Henrik Nordstrom
7aa4bfc671 Custom callbacks for performing low level socket I/O 2011-08-21 15:19:44 +02:00
Daniel Stenberg
462996b064 version bump: start working towards 1.3.0 2011-08-16 23:03:52 +02:00
Daniel Stenberg
07d7a85bdb RELEASE-NOTES: synced with 95d69d3a81 2011-08-16 10:30:13 +02:00
Henrik Nordstrom
95d69d3a81 Document prototypes for macro defined functions 2011-08-16 10:29:07 +02:00
Henrik Nordstrom
2fe1770d9f Avoid reuse after free when closing X11 channels 2011-08-16 10:27:49 +02:00
Daniel Stenberg
3c71ad4fce _libssh2_channel_write: handle window_size == 0 better
When about to send data on the channel and the window size is 0, we must
not just return 0 if the transport_read() function returned EAGAIN as it
then causes a busy-loop.

Bug: http://libssh2.org/mail/libssh2-devel-archive-2011-08/0011.shtml
2011-08-11 14:36:05 +02:00
Daniel Stenberg
79f48e4881 gettimeofday: fix name space pollution
For systems without its own gettimeofday() implementation, we still must
not provide one outside our namespace.

Reported by: Bill Segall
2011-08-05 23:50:22 +02:00
Dan Fandrich
49453c9ae2 libssh2.pc.in: Fixed spelling in pkgconfig file 2011-08-05 14:33:26 -07:00
Peter Stuge
b232eeb598 example/subsystem_netconf.c: Add missing #include <string.h> 2011-07-17 08:04:52 +02:00