diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-08-07 13:24:24 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-08-07 13:24:24 +1000 |
commit | b9d3f41ceb432a6edc53fa41e0af70872f14a56b (patch) | |
tree | cdb4243b534033c5d3c9002e8f366452175f279a | |
parent | bdf571b0dc29efdec02c8a56f102077bf49aeb7c (diff) |
- (dtucker) [session.c] Have session_break_req not attempt to send a break
if TIOCSBRK and TIOCCBRK are not defined (eg Cygwin).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | session.c | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20030807 | ||
2 | - (dtucker) [session.c] Have session_break_req not attempt to send a break | ||
3 | if TIOCSBRK and TIOCCBRK are not defined (eg Cygwin). | ||
4 | |||
1 | 20030802 | 5 | 20030802 |
2 | - (dtucker) [monitor.h monitor_wrap.h] Remove excess ident tags. | 6 | - (dtucker) [monitor.h monitor_wrap.h] Remove excess ident tags. |
3 | - (dtucker) OpenBSD CVS Sync | 7 | - (dtucker) OpenBSD CVS Sync |
@@ -785,4 +789,4 @@ | |||
785 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 789 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
786 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 790 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
787 | 791 | ||
788 | $Id: ChangeLog,v 1.2879 2003/08/02 14:36:16 dtucker Exp $ | 792 | $Id: ChangeLog,v 1.2880 2003/08/07 03:24:24 dtucker Exp $ |
@@ -1702,6 +1702,7 @@ session_break_req(Session *s) | |||
1702 | break_length = packet_get_int(); | 1702 | break_length = packet_get_int(); |
1703 | packet_check_eom(); | 1703 | packet_check_eom(); |
1704 | 1704 | ||
1705 | #if defined(TIOCSBRK) && defined(TIOCCBRK) | ||
1705 | if (s->ttyfd == -1) | 1706 | if (s->ttyfd == -1) |
1706 | return 0; | 1707 | return 0; |
1707 | /* we will sleep from 500ms to 3000ms */ | 1708 | /* we will sleep from 500ms to 3000ms */ |
@@ -1712,6 +1713,9 @@ session_break_req(Session *s) | |||
1712 | usleep(break_length * 1000); | 1713 | usleep(break_length * 1000); |
1713 | ioctl(s->ttyfd, TIOCCBRK, NULL); | 1714 | ioctl(s->ttyfd, TIOCCBRK, NULL); |
1714 | return 1; | 1715 | return 1; |
1716 | #else | ||
1717 | return 0; | ||
1718 | #endif | ||
1715 | } | 1719 | } |
1716 | 1720 | ||
1717 | static int | 1721 | static int |