1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-31 23:30:25 +03:00

compress: faster check, better return codes

In the transport functions we avoid a strcmp() now and just check a
boolean instead.

The compress/decompress function's return code is now acknowledged and
used as actual return code in case of failures.
This commit is contained in:
Daniel Stenberg
2010-10-08 16:26:50 +02:00
parent 0d58af6aec
commit 59636cc11e
3 changed files with 20 additions and 18 deletions

View File

@@ -998,7 +998,7 @@ struct _LIBSSH2_CRYPT_METHOD
struct _LIBSSH2_COMP_METHOD
{
const char *name;
int compress; /* 1 if it does compress, 0 if it doesn't */
int (*init) (LIBSSH2_SESSION * session, int compress, void **abstract);
int (*comp) (LIBSSH2_SESSION * session, int compress, unsigned char **dest,
size_t *dest_len, size_t payload_limit,