Cygwin: [gs]et_io_handle(): renamed to [gs]et_handle().
- Unify get_io_handle() and get_handle() to get_handle(). Both of them returned same value; io_handle. - Rename set_io_handle() to set_handle().
This commit is contained in:
committed by
Corinna Vinschen
parent
023c107a22
commit
a9c661a94d
@@ -518,14 +518,14 @@ fhandler_socket_wsock::fixup_after_fork (HANDLE parent)
|
||||
if (new_sock == INVALID_SOCKET)
|
||||
{
|
||||
set_winsock_errno ();
|
||||
set_io_handle ((HANDLE) INVALID_SOCKET);
|
||||
set_handle ((HANDLE) INVALID_SOCKET);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Even though the original socket was not inheritable, the duplicated
|
||||
socket is potentially inheritable again. */
|
||||
SetHandleInformation ((HANDLE) new_sock, HANDLE_FLAG_INHERIT, 0);
|
||||
set_io_handle ((HANDLE) new_sock);
|
||||
set_handle ((HANDLE) new_sock);
|
||||
debug_printf ("WSASocket succeeded (%p)", new_sock);
|
||||
}
|
||||
}
|
||||
@@ -571,13 +571,13 @@ fhandler_socket_wsock::dup (fhandler_base *child, int flags)
|
||||
|
||||
cygheap->user.deimpersonate ();
|
||||
fhs->init_fixup_before ();
|
||||
fhs->set_io_handle (get_io_handle ());
|
||||
fhs->set_handle (get_handle ());
|
||||
int ret = fhs->fixup_before_fork_exec (GetCurrentProcessId ());
|
||||
cygheap->user.reimpersonate ();
|
||||
if (!ret)
|
||||
{
|
||||
fhs->fixup_after_fork (GetCurrentProcess ());
|
||||
if (fhs->get_io_handle() != (HANDLE) INVALID_SOCKET)
|
||||
if (fhs->get_handle() != (HANDLE) INVALID_SOCKET)
|
||||
return 0;
|
||||
}
|
||||
cygheap->fdtab.dec_need_fixup_before ();
|
||||
@@ -645,7 +645,7 @@ fhandler_socket_wsock::set_socket_handle (SOCKET sock, int af, int type,
|
||||
}
|
||||
}
|
||||
}
|
||||
set_io_handle ((HANDLE) sock);
|
||||
set_handle ((HANDLE) sock);
|
||||
set_addr_family (af);
|
||||
set_socket_type (type);
|
||||
if (!init_events ())
|
||||
|
Reference in New Issue
Block a user