mirror of
https://github.com/solemnwarning/directplay-lite
synced 2024-12-30 16:45:37 +01:00
Misc. fixes
- Honour DPNSEND_NOCOMPLETE flag to IDirectPlay8Peer::SendTo() - Allow calling IDirectPlay8Peer::GetGroupInfo() in more states so that it can be called when processing DPNMSG_GROUP_CREATE during connection. - Don't buffer log messages.
This commit is contained in:
parent
e1b51c22b1
commit
1837aa1915
@ -789,9 +789,12 @@ HRESULT DirectPlay8Peer::SendTo(CONST DPNID dpnid, CONST DPN_BUFFER_DESC* CONST
|
|||||||
delete result;
|
delete result;
|
||||||
delete pending;
|
delete pending;
|
||||||
|
|
||||||
l.unlock();
|
if(!(dwFlags & DPNSEND_NOCOMPLETE))
|
||||||
message_handler(message_handler_ctx, DPN_MSGID_SEND_COMPLETE, &sc);
|
{
|
||||||
l.lock();
|
l.unlock();
|
||||||
|
message_handler(message_handler_ctx, DPN_MSGID_SEND_COMPLETE, &sc);
|
||||||
|
l.lock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1967,12 +1970,12 @@ HRESULT DirectPlay8Peer::GetGroupInfo(CONST DPNID dpnid, DPN_GROUP_INFO* CONST p
|
|||||||
case STATE_NEW: return DPNERR_UNINITIALIZED;
|
case STATE_NEW: return DPNERR_UNINITIALIZED;
|
||||||
case STATE_INITIALISED: return DPNERR_NOCONNECTION;
|
case STATE_INITIALISED: return DPNERR_NOCONNECTION;
|
||||||
case STATE_HOSTING: break;
|
case STATE_HOSTING: break;
|
||||||
case STATE_CONNECTING_TO_HOST: return DPNERR_CONNECTING;
|
case STATE_CONNECTING_TO_HOST: break;
|
||||||
case STATE_CONNECTING_TO_PEERS: return DPNERR_CONNECTING;
|
case STATE_CONNECTING_TO_PEERS: break;
|
||||||
case STATE_CONNECT_FAILED: return DPNERR_CONNECTING;
|
case STATE_CONNECT_FAILED: break;
|
||||||
case STATE_CONNECTED: break;
|
case STATE_CONNECTED: break;
|
||||||
case STATE_CLOSING: return DPNERR_CONNECTIONLOST;
|
case STATE_CLOSING: break;
|
||||||
case STATE_TERMINATED: return DPNERR_CONNECTIONLOST;
|
case STATE_TERMINATED: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Group *group = get_group_by_id(dpnid);
|
Group *group = get_group_by_id(dpnid);
|
||||||
|
@ -23,6 +23,10 @@ static void _log_init()
|
|||||||
if(log_name != NULL)
|
if(log_name != NULL)
|
||||||
{
|
{
|
||||||
log_fh = fopen(log_name, "a");
|
log_fh = fopen(log_name, "a");
|
||||||
|
if(log_fh != NULL)
|
||||||
|
{
|
||||||
|
setbuf(log_fh, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *t = getenv("DPLITE_TRACE");
|
const char *t = getenv("DPLITE_TRACE");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user