- (dtucker) [session.c] Have session_break_req not attempt to send a break

if TIOCSBRK and TIOCCBRK are not defined (eg Cygwin).
This commit is contained in:
Darren Tucker 2003-08-07 13:24:24 +10:00
parent bdf571b0dc
commit b9d3f41ceb
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
20030807
- (dtucker) [session.c] Have session_break_req not attempt to send a break
if TIOCSBRK and TIOCCBRK are not defined (eg Cygwin).
20030802
- (dtucker) [monitor.h monitor_wrap.h] Remove excess ident tags.
- (dtucker) OpenBSD CVS Sync
@ -785,4 +789,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2879 2003/08/02 14:36:16 dtucker Exp $
$Id: ChangeLog,v 1.2880 2003/08/07 03:24:24 dtucker Exp $

View File

@ -1702,6 +1702,7 @@ session_break_req(Session *s)
break_length = packet_get_int();
packet_check_eom();
#if defined(TIOCSBRK) && defined(TIOCCBRK)
if (s->ttyfd == -1)
return 0;
/* we will sleep from 500ms to 3000ms */
@ -1712,6 +1713,9 @@ session_break_req(Session *s)
usleep(break_length * 1000);
ioctl(s->ttyfd, TIOCCBRK, NULL);
return 1;
#else
return 0;
#endif
}
static int