changed wxFDIODispatcher::UnregisterFD() to take only fd, without flags, and unregister it unconditionally; use ModifyFD() to just change the flags (modified part of patch 1733626)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -180,13 +180,24 @@ void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket,
|
||||
return;
|
||||
|
||||
wxGSocketIOHandler * const
|
||||
handler = (wxGSocketIOHandler*)dispatcher->UnregisterFD(fd, flag);
|
||||
handler = wx_static_cast(wxGSocketIOHandler *, dispatcher->FindHandler(fd));
|
||||
if ( handler )
|
||||
{
|
||||
handler->RemoveFlag(flag);
|
||||
|
||||
if ( !handler->GetFlags() )
|
||||
{
|
||||
dispatcher->UnregisterFD(fd);
|
||||
delete handler;
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatcher->ModifyFD(fd, handler, handler->GetFlags());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatcher->UnregisterFD(fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user