comparison svr-session.c @ 6:ab00ef513e97

Sorted out the first channel init issues.
author Matt Johnston <matt@ucc.asn.au>
date Tue, 01 Jun 2004 10:48:46 +0000
parents bc6477a6c393
children 425ed5c20157
comparison
equal deleted inserted replaced
5:bc6477a6c393 6:ab00ef513e97
38 38
39 static void svr_remoteclosed(); 39 static void svr_remoteclosed();
40 40
41 struct serversession svr_ses; 41 struct serversession svr_ses;
42 42
43 const struct ChanType *chantypes[] = {
44 &svrchansess,
45 NULL /* Null termination is mandatory. */
46 };
47
48
43 void svr_session(int sock, runopts *opts, int childpipe, 49 void svr_session(int sock, runopts *opts, int childpipe,
44 struct sockaddr* remoteaddr) { 50 struct sockaddr* remoteaddr) {
45 51
46 fd_set readfd, writefd; 52 fd_set readfd, writefd;
47 struct timeval timeout; 53 struct timeval timeout;
54 ses.remotehost = getaddrhostname(remoteaddr); 60 ses.remotehost = getaddrhostname(remoteaddr);
55 61
56 /* Initialise server specific parts of the session */ 62 /* Initialise server specific parts of the session */
57 svr_ses.childpipe = childpipe; 63 svr_ses.childpipe = childpipe;
58 authinitialise(); 64 authinitialise();
65 chaninitialise(chantypes);
59 svr_chansessinitialise(); 66 svr_chansessinitialise();
60 67
61 if (gettimeofday(&timeout, 0) < 0) { 68 if (gettimeofday(&timeout, 0) < 0) {
62 dropbear_exit("Error getting time"); 69 dropbear_exit("Error getting time");
63 } 70 }