diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |