Daniel Stenberg
5804444936
scp_write_nonblock: Value stored to 'ptr' is never read
2010-04-24 12:56:53 +02:00
Daniel Stenberg
ee5dd3561d
sftp_mkdir: less silly output but show failures
2010-04-24 12:56:13 +02:00
Daniel Stenberg
21a01c96f8
remove unused variable
2010-04-17 13:38:07 +02:00
Simon Josefsson
5456163507
Fix build problem.
2010-03-19 09:40:50 +01:00
Simon Josefsson
7301036421
Eat our own dog food, call libssh2_init and libssh2_exit in the examples.
2010-03-19 09:35:00 +01:00
Simon Josefsson
e4232e531b
Silence compiler warning.
2010-02-23 15:49:47 +01:00
Daniel Stenberg
b4f12e153a
show more verbose error when SCP send fails
2010-02-21 19:29:23 +01:00
Daniel Stenberg
dea503df73
improved error handling
2010-02-21 19:08:14 +01:00
Peter Stuge
2149244cfe
Fix resource and memory leaks in examples as reported by cppcheck
...
Thanks to Ettl Martin for the report and patch. This fixes #132
2010-02-16 13:21:57 +01:00
Dave McCaldon
ea914c8b72
Resolve compile issues on Solaris x64 and UltraSPARC
...
Solaris builds of libssh2-1.2.3 failed on both x64 and UltraSPARC
platforms because of two problems:
1) src/agent.c:145 sun is a reserved word when using the SUNWspro compiler
2) example/direct_tcpip.c:84 INADDR_NONE is not defined
2010-02-09 11:19:52 +01:00
Daniel Stenberg
91841731af
fix building out of source tree by proving better include path
...
when building out of source tree, we provide -I$(top_builddir)/example
since the libssh2_config.h gets generated in that dir
2010-02-03 19:21:12 +01:00
Peter Stuge
68a900d27a
Detect when the forwarded connection is closed in example/direct_tcpip.c
2010-01-30 00:45:56 +01:00
Peter Stuge
e4b7baa885
Fix example/direct_tcpip.c to work also on WIN32
...
read() and write() are no good for WIN32 sockets, use recv() and send().
2010-01-30 00:35:05 +01:00
Peter Stuge
2622bbaf33
Ignore libssh2_config.h.in and stamp-h2 in example/ and remove .cvsignore
2010-01-30 00:25:46 +01:00
Peter Stuge
d3dbe4c81e
Simplify WIN32 ifdefs in example/direct_tcpip.c to allow standalone compile
2010-01-30 00:01:51 +01:00
Peter Stuge
6df87e64b7
Use LIBSSH2_HOSTKEY_HASH_SHA1 instead of _MD5 in examples and tests
...
MD5 support is optional and may not always be available, while SHA1 is both
required and recommended.
2010-01-29 23:06:31 +01:00
Peter Stuge
6c543545fe
Make example/direct_tcpip.c compile for win32
...
One warning from FD_SET() remains, it is also in some other examples.
2010-01-29 20:35:24 +01:00
Daniel Stenberg
9f4292433a
ignore more generated files
2010-01-20 19:46:36 +01:00
Daniel Stenberg
7f27b0822d
cleanup includes
...
We now produce a local libssh2_config.h file in this dir for the
examples to use so I cleaned up the include path at the same time.
2010-01-13 22:21:09 +01:00
Daniel Stenberg
e3d8c1cfed
generate a libssh2_config.h in the example dir
...
buildconf copies the template to example/ and configure makes sure
to generate a proper file from it and the direct_tcpip.c example
is the first one to use it - to make sure it builds fine on more
paltforms
2010-01-13 13:46:56 +01:00
Simon Josefsson
11a114ee7c
Remove redundant #includes and reorder sys/types.h include.
2010-01-13 11:03:26 +01:00
Peter Stuge
bd0505d6b9
Add a direct-tcpip example which shows local port forwarding
2009-12-24 02:18:39 +01:00
Daiki Ueno
c573af83de
Don't request userauthlist after authentication.
2009-12-23 07:59:37 +09:00
Daiki Ueno
db26c4eace
Add an example to use ssh-agent API.
...
Signed-off-by: Simon Josefsson <simon@josefsson.org>
2009-12-21 12:19:33 +01:00
Simon Josefsson
b5e358618b
Move examples from example/simple to example/.
2009-12-19 10:54:45 +01:00
Peter Stuge
11ca8d5583
Clarify the scp_write examples slightly and use an octal mask for the mode
2009-09-30 00:12:23 +02:00
Peter Stuge
3cc2f143c1
Fix scp examples to loop correctly over libssh2_channel_write()
2009-09-20 01:35:19 +02:00
Dan Fandrich
1418993a0f
Some platforms need sys/socket.h included before netinet/in.h.
...
Fixed an unused variable compiler warning.
2009-09-16 07:49:32 -07:00
Guenter Knauf
1f8d58a4ce
added sys/select.h include to samples for fd_set on NetWare.
2009-09-06 06:15:29 +02:00
Guenter Knauf
05eb612f8e
some more .cvsignore / .gitignore fixes.
2009-09-04 02:23:28 +02:00
Daniel Stenberg
5b599fbf40
Ben Kibbey added a type parameter to the libssh2_session_hostkey() function,
...
which hasn't yet been in a public release so changing the API is fine!
2009-07-07 00:25:17 +02:00
Daniel Stenberg
75bec57c94
Guenter Knauf fixed this example to build on win32
2009-07-02 11:46:51 +02:00
Daniel Stenberg
32080def94
Olivier Hervieu provided this x11 forwarding example. This is the version
...
after my initial cleanup that I posted to the list on May 26th 2009. It still
has a few ugly spots that should be cleaned up, but until then it's will at
least be found in the repo. For this reason I don't add this to the makefile.
2009-06-05 09:04:24 +02:00
Tor Arntsen
2a142a6524
Ignore generated files
2009-06-04 18:20:29 +02:00
Daniel Stenberg
517909d37a
Added a call to libssh2_knownhost_writefile()
...
Updated to the slightly modified libssh2_knownhost_check() proto
2009-05-29 14:10:54 +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
bf884488ae
slighty better behavior and comments
2009-05-26 11:18:00 +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
4490c6b434
use a better example file name for the known_hosts file
2009-05-07 20:30:22 +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
6409bb53ba
remove pointless sleeps
2009-04-28 10:35:30 +00:00
Daniel Stenberg
5a3da233ec
Sofian Brabez removed duplicate calls to libssh2_session_set_blocking()
2009-03-31 12:20:36 +00:00
Daniel Stenberg
239bdffb59
avoid some busy-looping
2009-03-25 22:52:32 +00:00
Daniel Stenberg
bdd005a5e5
fixed to work quite similar to the sftp_nonblock example so that it waits
...
for the socket correctly and measures the transfer speed fine
2009-03-14 09:40:57 +00:00
Daniel Stenberg
d89782d99f
improved non-blocking behavior for some of the initing stuff before the actual
...
data transfer begins
2009-03-13 22:14:47 +00:00
Daniel Stenberg
2ba8db9168
wait for socket action accordingly, and do some measurements on the transfer
...
to make this better to use for speed tests
2009-03-13 12:35:13 +00:00
Simon Josefsson
1f015d72b1
Use AM_CPPFLAGS instead of deprecated INCLUDES.
2008-11-21 14:34:03 +00:00