comparison svr-session.c @ 454:7e43f5e473b9

- Add -K keepalive flag for dropbear and dbclient - Try to reduce the frequency of select() timeouts - Add a max receive window size of 1MB
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Aug 2007 15:12:06 +0000
parents c216212001fc
children 4317be8b7cf9
comparison
equal deleted inserted replaced
453:29953de278ae 454:7e43f5e473b9
75 }; 75 };
76 76
77 void svr_session(int sock, int childpipe, 77 void svr_session(int sock, int childpipe,
78 char* remotehost, char *addrstring) { 78 char* remotehost, char *addrstring) {
79 79
80 struct timeval timeout;
81
82 reseedrandom(); 80 reseedrandom();
83 81
84 crypto_init(); 82 crypto_init();
85 common_session_init(sock, remotehost); 83 common_session_init(sock, remotehost);
86 84
89 svr_ses.addrstring = addrstring; 87 svr_ses.addrstring = addrstring;
90 svr_authinitialise(); 88 svr_authinitialise();
91 chaninitialise(svr_chantypes); 89 chaninitialise(svr_chantypes);
92 svr_chansessinitialise(); 90 svr_chansessinitialise();
93 91
94 if (gettimeofday(&timeout, 0) < 0) { 92 ses.connect_time = time(NULL);
95 dropbear_exit("Error getting time");
96 }
97
98 ses.connecttimeout = timeout.tv_sec + AUTH_TIMEOUT;
99 93
100 /* set up messages etc */ 94 /* set up messages etc */
101 ses.remoteclosed = svr_remoteclosed; 95 ses.remoteclosed = svr_remoteclosed;
102 96
103 /* packet handlers */ 97 /* packet handlers */