when sending and don't have an address for channel yet, send the one

comms was created with, which is what client will have to do anyway.
This commit is contained in:
Eric House 2014-09-14 13:41:12 -07:00
parent b6f708ee75
commit 4d2f49d33f

View file

@ -1278,11 +1278,17 @@ sendMsg( CommsCtxt* comms, MsgQueueElem* elem )
#endif
#endif
} else {
const CommsAddrRec* addr;
(void)channelToAddress( comms, channelNo, &addr );
CommsAddrRec addr;
const CommsAddrRec* addrP;
(void)channelToAddress( comms, channelNo, &addrP );
if ( NULL == addrP ) {
comms_getAddr( comms, &addr );
addrP = &addr;
}
XP_ASSERT( !!comms->procs.send );
result = (*comms->procs.send)( elem->msg, elem->len, addr,
result = (*comms->procs.send)( elem->msg, elem->len, addrP,
gameID(comms), comms->procs.closure );
}