#if out setting of compress hooks if not using ZLIB

We shouldn't even try to call ssh_packet_set_compress_hooks if zlib
isn't enabled.  This change conditionally compiles it out.
This commit is contained in:
dkulwin 2015-11-04 17:55:54 -06:00
parent ddace27b97
commit 27739d90ed
1 changed files with 2 additions and 0 deletions

View File

@ -1965,10 +1965,12 @@ monitor_init(void)
mon->m_zback = mm_create(NULL, MM_MEMSIZE);
mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE);
#ifndef WIN32_ZLIB_NO
/* Compression needs to share state across borders */
ssh_packet_set_compress_hooks(ssh, mon->m_zlib,
(ssh_packet_comp_alloc_func *)mm_zalloc,
(ssh_packet_comp_free_func *)mm_zfree);
#endif
}
return mon;