mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-23 18:23:25 +08:00
- djm@cvs.openbsd.org 2002/06/21 05:50:51
[monitor.c] Don't initialise compression buffers when compression=no in sshd_config; ok Niels@
This commit is contained in:
parent
90ac0b5945
commit
2d6b83353b
10
ChangeLog
10
ChangeLog
@ -1,3 +1,11 @@
|
||||
20020621
|
||||
- (djm) Sync:
|
||||
- djm@cvs.openbsd.org 2002/06/21 05:50:51
|
||||
[monitor.c]
|
||||
Don't initialise compression buffers when compression=no in sshd_config;
|
||||
ok Niels@
|
||||
|
||||
|
||||
20020620
|
||||
- (bal) Fixed AIX environment handling, use setpcred() instead of existing
|
||||
code. (Bugzilla Bug 261)
|
||||
@ -986,4 +994,4 @@
|
||||
- (stevesk) entropy.c: typo in debug message
|
||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||
|
||||
$Id: ChangeLog,v 1.2234 2002/06/21 01:38:53 mouring Exp $
|
||||
$Id: ChangeLog,v 1.2235 2002/06/21 05:59:49 djm Exp $
|
||||
|
21
monitor.c
21
monitor.c
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: monitor.c,v 1.15 2002/06/19 18:01:00 markus Exp $");
|
||||
RCSID("$OpenBSD: monitor.c,v 1.16 2002/06/21 05:50:51 djm Exp $");
|
||||
|
||||
#include <openssl/dh.h>
|
||||
|
||||
@ -327,8 +327,10 @@ monitor_child_postauth(struct monitor *pmonitor)
|
||||
void
|
||||
monitor_sync(struct monitor *pmonitor)
|
||||
{
|
||||
/* The member allocation is not visible, so sync it */
|
||||
mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback);
|
||||
if (options.compression) {
|
||||
/* The member allocation is not visible, so sync it */
|
||||
mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
@ -1330,7 +1332,8 @@ monitor_apply_keystate(struct monitor *pmonitor)
|
||||
sizeof(outgoing_stream));
|
||||
|
||||
/* Update with new address */
|
||||
mm_init_compression(pmonitor->m_zlib);
|
||||
if (options.compression)
|
||||
mm_init_compression(pmonitor->m_zlib);
|
||||
|
||||
/* Network I/O buffers */
|
||||
/* XXX inefficient for large buffers, need: buffer_init_from_string */
|
||||
@ -1515,11 +1518,13 @@ monitor_init(void)
|
||||
mon->m_sendfd = pair[1];
|
||||
|
||||
/* Used to share zlib space across processes */
|
||||
mon->m_zback = mm_create(NULL, MM_MEMSIZE);
|
||||
mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE);
|
||||
if (options.compression) {
|
||||
mon->m_zback = mm_create(NULL, MM_MEMSIZE);
|
||||
mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE);
|
||||
|
||||
/* Compression needs to share state across borders */
|
||||
mm_init_compression(mon->m_zlib);
|
||||
/* Compression needs to share state across borders */
|
||||
mm_init_compression(mon->m_zlib);
|
||||
}
|
||||
|
||||
return mon;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user