summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-06-21 15:59:49 +1000
committerDamien Miller <djm@mindrot.org>2002-06-21 15:59:49 +1000
commit2d6b83353b3ec804e24bbb48ab5c7dd54b1690bf (patch)
tree658940843cd4365df28c86f6a97dc160b51977e1
parent90ac0b5945bc280ad86ae51fbd96875baac0f55b (diff)
- 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@
-rw-r--r--ChangeLog10
-rw-r--r--monitor.c21
2 files changed, 22 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b28a0e5..c7333bd5 100644
--- a/ChangeLog
+++ b/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 $
diff --git a/monitor.c b/monitor.c
index c769f12e..39b6248d 100644
--- a/monitor.c
+++ b/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;
}