- markus@cvs.openbsd.org 2003/08/13 08:33:02
[session.c] use more portable tcsendbreak(3) and ignore break_length; ok deraadt, millert
This commit is contained in:
parent
d85efee437
commit
3bdbd848ea
|
@ -1,5 +1,10 @@
|
||||||
20030813
|
20030813
|
||||||
- (dtucker) [session.c] Remove #ifdef TIOCSBRK kludge.
|
- (dtucker) [session.c] Remove #ifdef TIOCSBRK kludge.
|
||||||
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
- markus@cvs.openbsd.org 2003/08/13 08:33:02
|
||||||
|
[session.c]
|
||||||
|
use more portable tcsendbreak(3) and ignore break_length;
|
||||||
|
ok deraadt, millert
|
||||||
|
|
||||||
20030811
|
20030811
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
@ -818,4 +823,4 @@
|
||||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2889 2003/08/13 10:28:14 dtucker Exp $
|
$Id: ChangeLog,v 1.2890 2003/08/13 10:31:05 dtucker Exp $
|
||||||
|
|
14
session.c
14
session.c
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: session.c,v 1.159 2003/07/22 13:35:22 markus Exp $");
|
RCSID("$OpenBSD: session.c,v 1.160 2003/08/13 08:33:02 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -1693,18 +1693,12 @@ session_break_req(Session *s)
|
||||||
{
|
{
|
||||||
u_int break_length;
|
u_int break_length;
|
||||||
|
|
||||||
break_length = packet_get_int();
|
break_length = packet_get_int(); /* ignored */
|
||||||
packet_check_eom();
|
packet_check_eom();
|
||||||
|
|
||||||
if (s->ttyfd == -1)
|
if (s->ttyfd == -1 ||
|
||||||
|
tcsendbreak(s->ttyfd, 0) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
/* we will sleep from 500ms to 3000ms */
|
|
||||||
break_length = MIN(break_length, 3000);
|
|
||||||
break_length = MAX(break_length, 500);
|
|
||||||
ioctl(s->ttyfd, TIOCSBRK, NULL);
|
|
||||||
/* should we care about EINTR? */
|
|
||||||
usleep(break_length * 1000);
|
|
||||||
ioctl(s->ttyfd, TIOCCBRK, NULL);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue