Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,
throughout. * tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit some comments. * cygheap.h (init_cygheap::ctty): Add new element. * devices.in (device::parse): Remove special handling for /dev/tty. * devices.cc: Regenerate. * dtable.cc (build_fh_pc): Don't reset /dev/tty device. Let the device opener do that. * fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting noninherit flag for ctty. * tty.h: Move BOOLs to bools. (tty_min::set_ctty): Redeclare to _pinfo class. * pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty. Change first argument from tty number to tty_min class. * pinfo.h (_pinfo::set_ctty): Declare. * fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of set_ctty to _pinfo class. * fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially. Use saved cygheap value if it exists. Otherwise convert to real device and save on first time open. (fhandler_tty_common::dup): Potentially set controlling tty if duping a slave tty. * syscalls.cc (setsid): Close controlling tty in cygheap. * tty.cc: Change some BOOLs to bools.
This commit is contained in:
@ -487,8 +487,8 @@ int
|
||||
fhandler_socket::connect (const struct sockaddr *name, int namelen)
|
||||
{
|
||||
int res = -1;
|
||||
BOOL secret_check_failed = FALSE;
|
||||
BOOL in_progress = FALSE;
|
||||
bool secret_check_failed = false;
|
||||
bool in_progress = false;
|
||||
sockaddr_in sin;
|
||||
int secret [4];
|
||||
DWORD err;
|
||||
@ -506,7 +506,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen)
|
||||
{
|
||||
err = WSAGetLastError ();
|
||||
if (err == WSAEWOULDBLOCK || err == WSAEALREADY)
|
||||
in_progress = TRUE;
|
||||
in_progress = true;
|
||||
|
||||
if (err == WSAEWOULDBLOCK)
|
||||
WSASetLastError (WSAEINPROGRESS);
|
||||
@ -521,7 +521,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen)
|
||||
{
|
||||
if (!create_secret_event (secret))
|
||||
{
|
||||
secret_check_failed = TRUE;
|
||||
secret_check_failed = true;
|
||||
}
|
||||
else if (in_progress)
|
||||
signal_secret_event ();
|
||||
@ -532,7 +532,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen)
|
||||
if (!check_peer_secret_event (&sin, secret))
|
||||
{
|
||||
debug_printf ("accept from unauthorized server");
|
||||
secret_check_failed = TRUE;
|
||||
secret_check_failed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,8 +570,8 @@ int
|
||||
fhandler_socket::accept (struct sockaddr *peer, int *len)
|
||||
{
|
||||
int res = -1;
|
||||
BOOL secret_check_failed = FALSE;
|
||||
BOOL in_progress = FALSE;
|
||||
bool secret_check_failed = false;
|
||||
bool in_progress = false;
|
||||
|
||||
/* Allows NULL peer and len parameters. */
|
||||
struct sockaddr_in peer_dummy;
|
||||
@ -594,14 +594,14 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
|
||||
res = ::accept (get_socket (), peer, len);
|
||||
|
||||
if ((SOCKET) res == INVALID_SOCKET && WSAGetLastError () == WSAEWOULDBLOCK)
|
||||
in_progress = TRUE;
|
||||
in_progress = true;
|
||||
|
||||
if (get_addr_family () == AF_LOCAL && get_socket_type () == SOCK_STREAM)
|
||||
{
|
||||
if ((SOCKET) res != INVALID_SOCKET || in_progress)
|
||||
{
|
||||
if (!create_secret_event ())
|
||||
secret_check_failed = TRUE;
|
||||
secret_check_failed = true;
|
||||
else if (in_progress)
|
||||
signal_secret_event ();
|
||||
}
|
||||
@ -612,7 +612,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
|
||||
if (!check_peer_secret_event ((struct sockaddr_in*) peer))
|
||||
{
|
||||
debug_printf ("connect from unauthorized client");
|
||||
secret_check_failed = TRUE;
|
||||
secret_check_failed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user