- if (c == 0)
- {
- m_id[0] = wxTheApp->AddSocketHandler(socket->m_fd, wxSockReadMask,
- _GSocket_PM_Input, (void *)socket);
- }
- else
- {
- m_id[1] = wxTheApp->AddSocketHandler(socket->m_fd, wxSockWriteMask,
- _GSocket_PM_Output, (void *)socket);
+ if (d == FD_OUTPUT)
+ return wxTheApp->AddSocketHandler(socket->m_fd, wxSockWriteMask,
+ _GSocket_PM_Output, (void *)socket);
+ else
+ return wxTheApp->AddSocketHandler(socket->m_fd, wxSockReadMask,
+ _GSocket_PM_Input, (void *)socket);