summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8029085)
Don't require a connect script with demand if we are using
the pty or socket options.
Enforce the connect_delay if we are using the socket option.
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define RCSID "$Id: tty.c,v 1.21 2004/11/13 12:05:48 paulus Exp $"
+#define RCSID "$Id: tty.c,v 1.22 2004/11/13 12:07:29 paulus Exp $"
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
struct stat statbuf;
int fdflags;
struct stat statbuf;
int fdflags;
- if (demand && connect_script == 0) {
+ if (demand && notty) {
+ option_error("demand-dialling is incompatible with notty");
+ exit(EXIT_OPTION_ERROR);
+ }
+ if (demand && connect_script == 0 && ptycommand == NULL
+ && pty_socket == NULL) {
option_error("connect script is required for demand-dialling\n");
exit(EXIT_OPTION_ERROR);
}
option_error("connect script is required for demand-dialling\n");
exit(EXIT_OPTION_ERROR);
}
* time for something from the peer. This can avoid bouncing
* our packets off his tty before he has it set up.
*/
* time for something from the peer. This can avoid bouncing
* our packets off his tty before he has it set up.
*/
- if (connector != NULL || ptycommand != NULL)
+ if (connector != NULL || ptycommand != NULL || pty_socket != NULL)
listen_time = connect_delay;
return ttyfd;
listen_time = connect_delay;
return ttyfd;