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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user