summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2015-01-19 19:52:16 +0000
committerDamien Miller <djm@mindrot.org>2015-01-20 09:13:01 +1100
commit091c302829210c41e7f57c3f094c7b9c054306f0 (patch)
tree800de5dc85b877a85d1f269ae5bb09b0dc3fa7a7 /serverloop.c
parent4e62cc68ce4ba20245d208b252e74e91d3785b74 (diff)
upstream commit
update packet.c & isolate, introduce struct ssh a) switch packet.c to buffer api and isolate per-connection info into struct ssh b) (de)serialization of the state is moved from monitor to packet.c c) the old packet.c API is implemented in opacket.[ch] d) compress.c/h is removed and integrated into packet.c with and ok djm@
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/serverloop.c b/serverloop.c
index e92f9e27b..f1fbb0512 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.172 2014/07/15 15:54:14 millert Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.173 2015/01/19 19:52:16 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -83,7 +83,6 @@
83extern ServerOptions options; 83extern ServerOptions options;
84 84
85/* XXX */ 85/* XXX */
86extern Kex *xxx_kex;
87extern Authctxt *the_authctxt; 86extern Authctxt *the_authctxt;
88extern int use_privsep; 87extern int use_privsep;
89 88
@@ -545,7 +544,7 @@ drain_output(void)
545static void 544static void
546process_buffered_input_packets(void) 545process_buffered_input_packets(void)
547{ 546{
548 dispatch_run(DISPATCH_NONBLOCK, NULL, compat20 ? xxx_kex : NULL); 547 dispatch_run(DISPATCH_NONBLOCK, NULL, compat20 ? active_state->kex : NULL);
549} 548}
550 549
551/* 550/*
@@ -851,7 +850,7 @@ server_loop2(Authctxt *authctxt)
851 for (;;) { 850 for (;;) {
852 process_buffered_input_packets(); 851 process_buffered_input_packets();
853 852
854 rekeying = (xxx_kex != NULL && !xxx_kex->done); 853 rekeying = (active_state->kex != NULL && !active_state->kex->done);
855 854
856 if (!rekeying && packet_not_very_much_data_to_write()) 855 if (!rekeying && packet_not_very_much_data_to_write())
857 channel_output_poll(); 856 channel_output_poll();
@@ -874,8 +873,8 @@ server_loop2(Authctxt *authctxt)
874 channel_after_select(readset, writeset); 873 channel_after_select(readset, writeset);
875 if (packet_need_rekeying()) { 874 if (packet_need_rekeying()) {
876 debug("need rekeying"); 875 debug("need rekeying");
877 xxx_kex->done = 0; 876 active_state->kex->done = 0;
878 kex_send_kexinit(xxx_kex); 877 kex_send_kexinit(active_state->kex);
879 } 878 }
880 } 879 }
881 process_input(readset); 880 process_input(readset);