comparison common-channel.c @ 156:8c2b3506f112

Rearrange preprocessor parts so that compilation with various options disabled works OK.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 22 Dec 2004 15:37:50 +0000
parents 2e9d1f29c50f
children 0cfba3034be5
comparison
equal deleted inserted replaced
153:6ba95762ec4e 156:8c2b3506f112
919 919
920 encrypt_packet(); 920 encrypt_packet();
921 TRACE(("leave send_msg_channel_open_confirmation")); 921 TRACE(("leave send_msg_channel_open_confirmation"));
922 } 922 }
923 923
924 #ifdef USING_LISTENERS 924 #if defined(USING_LISTENERS) || defined(DROPBEAR_CLIENT)
925 /* Create a new channel, and start the open request. This is intended 925 /* Create a new channel, and start the open request. This is intended
926 * for X11, agent, tcp forwarding, and should be filled with channel-specific 926 * for X11, agent, tcp forwarding, and should be filled with channel-specific
927 * options, with the calling function calling encrypt_packet() after 927 * options, with the calling function calling encrypt_packet() after
928 * completion. It is mandatory for the caller to encrypt_packet() if 928 * completion. It is mandatory for the caller to encrypt_packet() if
929 * DROPBEAR_SUCCESS is returned */ 929 * DROPBEAR_SUCCESS is returned */
1004 dropbear_exit("Unknown channel"); 1004 dropbear_exit("Unknown channel");
1005 } 1005 }
1006 1006
1007 removechannel(channel); 1007 removechannel(channel);
1008 } 1008 }
1009 #endif /* USING_LISTENERS */
1009 1010
1010 /* close a stdout/stderr fd */ 1011 /* close a stdout/stderr fd */
1011 static void closeoutfd(struct Channel * channel, int fd) { 1012 static void closeoutfd(struct Channel * channel, int fd) {
1012 1013
1013 /* don't close it if it is the same as infd, 1014 /* don't close it if it is the same as infd,
1055 } 1056 }
1056 if (closein && (channel->extrabuf != NULL) && (fd == channel->errfd)) { 1057 if (closein && (channel->extrabuf != NULL) && (fd == channel->errfd)) {
1057 channel->errfd = FD_CLOSED; 1058 channel->errfd = FD_CLOSED;
1058 } 1059 }
1059 } 1060 }
1060
1061 #endif /* USING_LISTENERS */