comparison svr-session.c @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents 9169e4e7cbee
children 2c9dac2d6707
comparison
equal deleted inserted replaced
1294:56aba7dedbea 1295:750ec4ec4cbe
60 {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close}, 60 {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close},
61 {SSH_MSG_CHANNEL_SUCCESS, ignore_recv_response}, 61 {SSH_MSG_CHANNEL_SUCCESS, ignore_recv_response},
62 {SSH_MSG_CHANNEL_FAILURE, ignore_recv_response}, 62 {SSH_MSG_CHANNEL_FAILURE, ignore_recv_response},
63 {SSH_MSG_REQUEST_FAILURE, ignore_recv_response}, /* for keepalive */ 63 {SSH_MSG_REQUEST_FAILURE, ignore_recv_response}, /* for keepalive */
64 {SSH_MSG_REQUEST_SUCCESS, ignore_recv_response}, /* client */ 64 {SSH_MSG_REQUEST_SUCCESS, ignore_recv_response}, /* client */
65 #ifdef USING_LISTENERS 65 #if DROPBEAR_LISTENERS
66 {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation}, 66 {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation},
67 {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure}, 67 {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure},
68 #endif 68 #endif
69 {0, 0} /* End */ 69 {0, 0} /* End */
70 }; 70 };
71 71
72 static const struct ChanType *svr_chantypes[] = { 72 static const struct ChanType *svr_chantypes[] = {
73 &svrchansess, 73 &svrchansess,
74 #ifdef ENABLE_SVR_LOCALTCPFWD 74 #if DROPBEAR_SVR_LOCALTCPFWD
75 &svr_chan_tcpdirect, 75 &svr_chan_tcpdirect,
76 #endif 76 #endif
77 NULL /* Null termination is mandatory. */ 77 NULL /* Null termination is mandatory. */
78 }; 78 };
79 79
94 94
95 common_session_init(sock, sock); 95 common_session_init(sock, sock);
96 96
97 /* Initialise server specific parts of the session */ 97 /* Initialise server specific parts of the session */
98 svr_ses.childpipe = childpipe; 98 svr_ses.childpipe = childpipe;
99 #ifdef USE_VFORK 99 #if DROPBEAR_VFORK
100 svr_ses.server_pid = getpid(); 100 svr_ses.server_pid = getpid();
101 #endif 101 #endif
102 svr_authinitialise(); 102 svr_authinitialise();
103 chaninitialise(svr_chantypes); 103 chaninitialise(svr_chantypes);
104 svr_chansessinitialise(); 104 svr_chansessinitialise();
168 "Exit before auth: %s", format); 168 "Exit before auth: %s", format);
169 } 169 }
170 170
171 _dropbear_log(LOG_INFO, fmtbuf, param); 171 _dropbear_log(LOG_INFO, fmtbuf, param);
172 172
173 #ifdef USE_VFORK 173 #if DROPBEAR_VFORK
174 /* For uclinux only the main server process should cleanup - we don't want 174 /* For uclinux only the main server process should cleanup - we don't want
175 * forked children doing that */ 175 * forked children doing that */
176 if (svr_ses.server_pid == getpid()) 176 if (svr_ses.server_pid == getpid())
177 #endif 177 #endif
178 { 178 {
209 } 209 }
210 #endif 210 #endif
211 211
212 /* if we are using DEBUG_TRACE, we want to print to stderr even if 212 /* if we are using DEBUG_TRACE, we want to print to stderr even if
213 * syslog is used, so it is included in error reports */ 213 * syslog is used, so it is included in error reports */
214 #ifdef DEBUG_TRACE 214 #if DEBUG_TRACE
215 havetrace = debug_trace; 215 havetrace = debug_trace;
216 #endif 216 #endif
217 217
218 if (!opts.usingsyslog || havetrace) { 218 if (!opts.usingsyslog || havetrace) {
219 struct tm * local_tm = NULL; 219 struct tm * local_tm = NULL;