Commit Graph

100 Commits

Author SHA1 Message Date
Guenter Knauf
669e69966a another trial to fix the typedefs. 2007-07-16 22:05:30 +00:00
Daniel Stenberg
d574d7dea0 Added LIBSSH2_TIMESTAMP to the public header and it contains the timestamp of
the making of the release archive.

Added 'maketgz' as a script to build release archives with, including automated
snapshots or whatever. It updates the defines in include/libssh2.h.

configure now extracts the version number from the include/libssh2.h header in
the source tree instead of using it fixed set in the script (to remove the
need for regenerating the configure script when we run maketgz).

Makefile.am now has a dist-hook that puts ".dist" files in the release tree
instead of the file without the .dist extension, so that we can easily add
modified files in release archives. Like maketgz.
2007-07-15 21:36:29 +00:00
Guenter Knauf
8485ee6fd5 introduced some more version defines. 2007-07-14 22:18:32 +00:00
James Housley
14881b2370 For now make LIBSSH2_APINO a long, some compilers make constants an int it
seems.
2007-07-14 16:21:50 +00:00
Guenter Knauf
4ec68bdc04 added build for older CLIB version. 2007-07-09 22:47:24 +00:00
Guenter Knauf
b53db3d3a9 fix bug #1701782 - for now we only define for the compiler versions where we know for sure - if later versions still need those defines please report to the list. 2007-07-05 12:52:30 +00:00
Guenter Knauf
83d77f3878 enter next round after release. 2007-07-05 12:46:42 +00:00
James Housley
0742a972c1 Created libssh2_sftp_readdir_ex() and updated LIBSSH2_APINO to 200706151200 2007-06-15 17:22:49 +00:00
James Housley
dde2b09496 libssh2_channel_free() actually can return PACKET_EAGAIN. Update all
calling functions to support that with the following API notes:

* libssh2_publickey_shutdown(), libssh2_session_free() changed
  to return an "int" to allow signaling of LIBSSH2_ERROR_EAGAIN.

* libssh2_scp_recv(), libssh2_scp_send_ex() and libssh2_sftp_init()
  will loop in on libssh2_channel_free() when there is an error.
  It is not possible to return LIBSSH2_ERROR_EAGAIN in this condition
  in these 3 functions and not lose the original error code.
2007-06-12 18:27:37 +00:00
Daniel Stenberg
d073a4ea52 include sys/types.h since the compile breaks on Linux otherwise - we need
ssize_t from there
2007-06-10 21:26:58 +00:00
James Housley
cf8f4d1818 To simplify the user's error interface always use LIBSSH2_ERROR_EAGAIN.
LIBSSH2CHANNEL_EAGAIN and LIBSSH2SFTP_EAGAIN are still valid, but are
defined as LIBSSH2_ERROR_EAGAIN.
2007-06-08 13:33:08 +00:00
James Housley
7d57222912 Finish making SFTP fully non-blocking capable.
Functions that return an "int", and friends, return LIBSSH2SFTP_EAGAIN.
Functions that return a structure return NULL and set the error to
LIBSSH2_ERROR_EAGAIN
2007-06-07 16:01:12 +00:00
James Housley
d141ba49f3 Make libssh2_sftp_write() be fully non-blocking. The state of the socket
is fully honored.  LIBSSH2SFTP_EAGAIN is returned when the call would
block.
2007-06-06 19:52:11 +00:00
James Housley
4b8db8c1ab Modify the code to truely support non-blocking. Propogate the EAGAIN error
all the way up to the user interface.  All code modules bug sftp.c have
been completed.

Functions that return an "int", or similar return LIBSSH2CHANNEL_EAGAIN to
indicate some part of the call would block, in non-blocking mode.

Functions that return a structure, like "LIBSSH2_CHANNEL *", return NULL
and set the libssh2 error.  The error can be obtained with either
libssh2_session_last_error() or libssh2_session_last_errno().  Either of
these will return the error code of LIBSSH2_ERROR_EAGAIN if the
call would block, in non-blocking mode.

The current state of a function and some variable are keep in the
structures so that on the next call the operation that would block can
be retried again with the same data.
2007-06-06 12:34:06 +00:00
James Housley
412b25d971 Initially the libssh2 code was indented with tabs of 4 spaces. Some of
the recent commits converted the tabs to 4 spaces, which matched the
initial indent size.  Other commits converted the tabs to 8 spaces, this
didn't match.

All the code has been converted to 4 space indents.  No changes to line
lengths or actual code was performed.  This is in preperation to my up
coming non-blocking work so my commits should only be code changes and
line lengths in the code I am working on.
2007-05-28 17:56:08 +00:00
James Housley
a66885c51c Make _libssh2_sftp_mkdir_ex() fully non-blocking safe. This makes
libssh2_sftp_mkdirnb_ex() non-blocking safe and libssh2_sftp_mkdir_ex()
blocking safe
2007-04-22 19:51:24 +00:00
James Housley
2dc313d365 Non-blocking work
* The following low level packet routines now fully support non-blocking:
    libssh2_sftp_packet_read()
    libssh2_sftp_packet_ask()
    libssh2_sftp_packet_require()
    libssh2_sftp_packet_requirev()

* libssh2_sftp_readdirnb() functions completely in non-blocking mode

* The rest of the routines which call the libssh2_sftp_packet_* routine
  loop on a return code of PACKET_EAGAIN.  This maintains the current
  functionality until they fully support non-blocking

* The state of all function are labeled with either NB-SAFE or NB-UNSAFE,
  for those that are know.  NB-UNSAFE?? for those that haven't been
  examined.
2007-04-21 18:16:23 +00:00
Dan Fandrich
09deb228f1 Added some consts to struct members 2007-04-19 19:40:45 +00:00
Dan Fandrich
9b81a01376 Made some function parameters in the API const. This is an API change,
but correctly-written applications should see no source or binary
compatibility issues.  Also fixed a few compiler warnings.
2007-04-18 18:51:03 +00:00
Guenter Knauf
86ca80028b blocked unistd.h inclusion for Win32 builds. 2007-04-12 22:10:12 +00:00
Guenter Knauf
0c060e1ccb added two more typedefs but blocked them so they are only used with MSVC6 or lower (dont know if later MSVC versions still need them). 2007-04-12 22:08:42 +00:00
Simon Josefsson
4c7ecad34d Don't use CPP symbol _MSC_VER unless it is defined, because undefined
CPP symbols means 0.  Tiny patch from "Yang Tse" <yangsita@gmail.com>.
2007-03-29 08:11:51 +00:00
Daniel Stenberg
e7181a8c36 Netware and Windows fixes by Guenter Knauf 2007-02-07 21:21:06 +00:00
Daniel Stenberg
b88eb6a096 let's call the current version 0.15-CVS 2007-02-06 14:19:59 +00:00
Daniel Stenberg
4f1cfb20a9 1 - new public function libssh2_trace() that enables tracing/debug output on
various stuff if libssh2 was built with debug. If built without debug, the
 function does nothing.
2 - configure --enable-debug is now enough to build a debug version (including
picky compiler options)
3 - internally, we no longer need/use #ifdef/#endif around all uses of the
_libssh2_debug() function/macro.

The scp.c example is the first application to test this new debug logging.
2007-02-02 23:23:36 +00:00
Daniel Stenberg
9d55db6501 Adding src/transport.c for the SECSH transport layer read/write in a non-
blocking way. The channel code is now responsible for enabling/disabling
blocking status and to work with it.

I've also modified indenting and fixed compiler warnings at places, and
added a bunch of new examples in example/simple that I've used to verify that
the code still runs like before.

libssh2_channel_{read|write}nb_ex() and libssh2_sftp_{read|write}nb() are the
four new functions that supposedly work non-blocking.
2007-02-02 16:21:20 +00:00
Daniel Stenberg
3b1b45e644 Moved the private include files libssh2_priv.h and libssh2_config.h.in from
include/ into the src/ directory. The include/ dir is now strictly for public
headers.

Also, I removed the special win32 source package creation target in the
makefile and I modified the contact email address in configure.in to point out
the libssh2-devel list.
2006-11-20 08:41:04 +00:00
James Housley
7058b7fc2a Reproduce most of the POSIX permission/file type defines from sys/stat.h
so that if compiled with a non-POSIX compiler these are still available
for client software.
2006-11-13 22:35:02 +00:00
James Housley
1961e07287 The public *_ex() API functions, most of them, used "int" for length values.
The convience functions pass in the return from strlen() which is "size_t",
usually an "unsigned long".  This created the possiblility of passing in
a value that could look negative.

All "int" lengths were converted to "unsigned int".  Ideally they should
all become "size_t", but that is a bigger change.  This is a good start.
2006-11-04 19:30:31 +00:00
Sara Golemon
ace0c8f00b Bump for release 2006-06-22 18:50:26 +00:00
Sara Golemon
adee5e5653 Don't wait for KEX_INIT prior to sending our own packet.
Watch out for bad KEX_INIT guesses and burn packets if necessary.
2006-06-22 18:45:29 +00:00
Sara Golemon
c45992da55 Bump copyright year 2006-03-02 01:10:52 +00:00
Sara Golemon
2207b99afb Bump version number 2006-03-02 01:10:06 +00:00
Sara Golemon
1d7522bc06 BugFix#1436593: Apply build options for HPUX targets 2006-02-23 23:14:35 +00:00
Sara Golemon
edcdf43264 Prep for release 2005-11-01 23:11:50 +00:00
Mikhail Gusarov
722470994a Added missing '#ifdef __cplusplus extern "C" {}' stanza 2005-10-04 04:25:24 +00:00
Sara Golemon
14f00247a8 Explicitly include sha.h and md5.h from openssl 2005-08-25 20:50:37 +00:00
Sara Golemon
e15f5d97a0 Add publickey subsystem support 2005-07-21 20:28:07 +00:00
Sara Golemon
d6cfa7c6b9 bump for release -- 0.11 2005-07-05 01:42:11 +00:00
Mikhail Gusarov
0c53895bc0 libssh2_poll_channel_read made external 2005-06-24 11:22:10 +00:00
Mikhail Gusarov
aa6e9c6eca Added libssh2_channel_wait_close() 2005-06-24 11:17:50 +00:00
Mikhail Gusarov
77bd3c1215 'exit-status' information packet handling added 2005-06-23 05:55:01 +00:00
Mikhail Gusarov
0e5eb4d9c5 Added extern "C" declaration for C++ compatibility 2005-06-20 05:17:51 +00:00
Mikhail Gusarov
0ad861d74c libssh2_userauth_list should return char*, not the const char* 2005-06-18 11:30:31 +00:00
Mikhail Gusarov
b6d13ebe8a Strictening function prototypes: char* -> const char* where applicable 2005-06-18 10:41:59 +00:00
Sara Golemon
2a6c49a73a Add abstract pointer to keyboard-interactive callback 2005-06-16 17:14:31 +00:00
Sara Golemon
da653774aa Add keyboard interactive authentication.
Implementation contributed by Mikhail Gusarov.
2005-06-11 19:18:06 +00:00
Sara Golemon
cc7703092f Save up multiple small refunds in order to cut down on unnecessary WINDOW_ADJUST packets 2005-05-18 17:08:29 +00:00
Sara Golemon
ebfbd22e59 Add debugging hooks for development diagnostics 2005-05-11 05:11:31 +00:00
Sara Golemon
3ea661a574 Bump for release 2005-05-05 18:48:51 +00:00