1
1
Граф коммитов

933 Коммитов

Автор SHA1 Сообщение Дата
Daniel Stenberg
2e990194ab Added man pages for the two newest members of the knownhosts API family:
libssh2_knownhost_readline() and libssh2_knownhost_writeline()
2009-05-29 10:12:22 +02:00
Daniel Stenberg
1afbbf4507 introducing libssh2_knownhost_writeline() and some cleanups to use more
defined error codes instead of the simplified -1 previously used a little too
much here
2009-05-29 10:00:45 +02:00
Daniel Stenberg
82bdd12a8b I think *readline() makes a better name 2009-05-29 00:19:02 +02:00
Daniel Stenberg
4df48aef41 clarify that the key "string" needs to be zero terminated too 2009-05-29 00:14:41 +02:00
Daniel Stenberg
bc28d0146d introducing libssh2_knownhost_read() that makes libssh2 read a single given
line
const'ified a few args to libssh2_knownhost_add() as well
2009-05-29 00:08:00 +02:00
Daniel Stenberg
8b1ec197b2 fix a warning for a comparison mixing signed and unsigned types 2009-05-28 22:54:37 +02:00
Daniel Stenberg
2436a4de60 After review/feedback/discussions on the mailing list. Rename two functions:
s/libssh2_knownhost_parsefile/libssh2_knownhost_readfile
s/libssh2_knownhost_dumpfile/libssh2_knownhost_writefile
2009-05-28 19:57:54 +02:00
Daniel Stenberg
22014f074b define removed 2009-05-28 16:12:24 +02:00
Daniel Stenberg
f35dbff3c4 LIBSSH2_KNOWNHOST_TYPE_DEFAULT is not a good idea, scrap it 2009-05-28 14:36:16 +02:00
Daniel Stenberg
703fbd9d11 Added the initial man pages for the 7 new functions for known host handling 2009-05-28 14:35:13 +02:00
Daniel Stenberg
5207690edf first shot at implementing libssh2_knownhost_dumpfile() and some minor
cleanups
2009-05-28 13:14:32 +02:00
Daniel Stenberg
eaa95e0331 introducing libssh2_knownhost_get() to the public API 2009-05-27 16:00:52 +02:00
Daniel Stenberg
d965dda027 clarified a comment 2009-05-26 11:18:29 +02:00
Daniel Stenberg
bf884488ae slighty better behavior and comments 2009-05-26 11:18:00 +02:00
Daniel Stenberg
28b08e0b4d remove include since we don't use struct iovec in this file 2009-05-26 11:14:07 +02:00
Daniel Stenberg
1ffa2cb519 These examples no longer need to explictly set the socket to non-blocking state
as libssh2 itself will always do that by itself.
2009-05-26 09:41:13 +02:00
Daniel Stenberg
279d6dd82a add myself as copyright owner 2009-05-25 11:35:06 +02:00
Daniel Stenberg
49192598d2 mention conversion of code to the new linked list code 2009-05-25 11:29:39 +02:00
Daniel Stenberg
6b7c19ec26 remove #if 0'ed code 2009-05-25 11:23:06 +02:00
Daniel Stenberg
160e5aa763 clarify the fix, as it wasn't a leak 2009-05-25 11:03:24 +02:00
Daniel Stenberg
42e9f02025 spell fix a comment 2009-05-25 10:58:13 +02:00
Daniel Stenberg
5a162ad9f8 Added some clarifying comments on how the 'sftpInit_sftp' and
'sftpInit_channel' struct fields within the session struct are used. And made
sure to clear them both correctly when sftp_init() returns instead of at
shutdown time, as it must not touch them at shutdown time. This should make it
possible to properly make more than one SFTP handle.
2009-05-25 10:50:49 +02:00
Daniel Stenberg
6ff83eab1b no need for LIBSSH2_ERROR_MEMORY when LIBSSH2_ERROR_ALLOC already exist!
added my own copyright line too now
2009-05-25 10:41:07 +02:00
Daniel Stenberg
8df3222d91 use LIBSSH2_ERROR_ALLOC instead of introducing a new error code 2009-05-25 10:40:36 +02:00
Daniel Stenberg
0357ce6c48 clear session->sftpInit_sftp unconditionally 2009-05-24 23:51:59 +02:00
Daniel Stenberg
c5f335ad4f Fix my recent session->sftpInit_sftp fix which wasn't correct. The memory area
does not need to be freed (it already gets freed) but clearing the pointer is
a good idea. And it should be done _after_ the channel_free() call.
2009-05-24 23:44:52 +02:00
Daniel Stenberg
fdc043e7b1 add an assert to help debugging 2009-05-24 23:44:23 +02:00
Daniel Stenberg
fdaa5ad5b4 Without CVS we must not use cvs tools to generate the changelog. I'm not
confident enough with git to attempt to make one so I'll just make a dummy for
now.
2009-05-23 23:03:31 +02:00
Daniel Stenberg
f1f49c3cce - Anonymous bug report #2795816 revealed that libssh2_sftp_shutdown() did not
properly free/cleanup the SFTP handle so libssh2 leaked memory and caused
   an assert() on subsequent libssh2_sftp_init() calls on the same session.
2009-05-23 22:30:43 +02:00
Daniel Stenberg
ad13de92d4 Fix _libssh2_channel_write(): fixed the write loop to also read from the
transport layer better, to avoid draining the window size when sending large
packets. I also fixed the return code for it to return the number of bytes
handled in this single invoke (and not the cumulative amount).
2009-05-20 14:34:30 +02:00
Daniel Stenberg
b755f3eb10 First, only try to send max packet size *4 to channel write, as trying to send
much larger packages only cause internal problems and much larger allocations.

Also fix sftp_write() when _libssh2_channel_write() returns that a packet was
only partially sent as that is not an error.

Fixed a few error messages to more accurately point out the problem
2009-05-20 14:31:46 +02:00
Daniel Stenberg
b95fe985af If recv() returns something less than the full buffer we know we're done for
now, so skip looping and doing another read that then simply will cause an
EAGAIN as it may trick the user into believing things that aren't true.
2009-05-20 14:30:05 +02:00
daniel
035cb24fa0 remove the old style as it makes little sense to mention here anymore 2009-05-14 17:01:54 +02:00
Daniel Stenberg
18e03739be typo 2009-05-12 10:10:55 +00:00
Daniel Stenberg
e367e1ad4e comment typo and some indent fixes 2009-05-12 10:07:30 +00:00
Daniel Stenberg
f7149d1830 Partial fix based on the patch and discussions in #2788319 2009-05-12 09:33:22 +00:00
Daniel Stenberg
042b545247 clear the passed in struct when the entry has been removed to help prevent
mistakes due to re-use
2009-05-12 09:32:51 +00:00
Daniel Stenberg
4490c6b434 use a better example file name for the known_hosts file 2009-05-07 20:30:22 +00:00
Daniel Stenberg
d3542e6f7d split out the knownhost code from hostkey.c into its own separate source file
now: knownhost.c
2009-05-07 17:21:56 +00:00
Daniel Stenberg
0cee15dc0c this was never supposed to be added for real 2009-05-07 17:21:14 +00:00
Daniel Stenberg
4b991b232d My knownhost work as of right now. It works at least partly. More tests and
tweaks will come.
2009-05-07 13:09:48 +00:00
Daniel Stenberg
4bc1b8a1d7 get host, user, password and command from the command line 2009-05-05 12:30:19 +00:00
Daniel Stenberg
755e213ae6 Added ssh2_exec as a new example, showing how to run a command remotely with
libssh2
2009-05-05 12:27:02 +00:00
Daniel Stenberg
9412588373 bug #2785173 pointed out that we really must call _libssh2_transport_read()
in loops until it returns < 0 when we call it, as if we just call it once we
may drain the socket for data and then leave unused in-memory data that we
won't detect because the socket is back to idle...
2009-05-01 19:07:20 +00:00
Daniel Stenberg
9f104cd883 Markus posted a bug report about a bad 0-return from libssh2_channel_read:
http://libssh2.haxx.se/mail/libssh2-devel-archive-2009-04/0076.shtml

  And it was indeed a bad loop that terminated too early due to a receveived
  close packet.
2009-04-30 10:30:26 +00:00
Daniel Stenberg
6409bb53ba remove pointless sleeps 2009-04-28 10:35:30 +00:00
Daniel Stenberg
c306119dd6 edited 2009-04-14 21:43:39 +00:00
Daniel Stenberg
2b8038e175 libssh2_poll() and libssh2_poll_channel_read() are now considered and
documented deprecated and they will be removed at next soname bump. It also
  saves us from fixing some rather quirky bugs in libssh2_poll()...
2009-04-14 21:38:36 +00:00
Guenter Knauf
2a39b32b1a some minor Makefile tweaks; mainly for crosscompiling. 2009-04-09 03:13:51 +00:00
Daniel Stenberg
e63cbd907f Jussi Mononen pointed out we used an unsigned variable to store negative
values in, when a plain int is much better anyway since it matches the return
type.
2009-04-06 14:50:29 +00:00