mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
don't try to send without an address. Fixes an occasional assertion
failure.
This commit is contained in:
parent
01c86522ef
commit
b2f67cfcce
1 changed files with 11 additions and 5 deletions
|
@ -968,11 +968,17 @@ public class BTService extends Service {
|
|||
|
||||
public int transportSend( byte[] buf, final CommsAddrRec addr, int gameID )
|
||||
{
|
||||
Assert.assertNotNull( addr );
|
||||
m_sender.add( new BTQueueElem( BTCmd.MESG_SEND, buf,
|
||||
addr.bt_hostName, addr.bt_btAddr,
|
||||
gameID ) );
|
||||
return buf.length;
|
||||
int sent = -1;
|
||||
if ( null != addr ) {
|
||||
m_sender.add( new BTQueueElem( BTCmd.MESG_SEND, buf,
|
||||
addr.bt_hostName,
|
||||
addr.bt_btAddr, gameID ) );
|
||||
sent = buf.length;
|
||||
} else {
|
||||
DbgUtils.logf( "BTMsgSink.transportSend: "
|
||||
+ "addr null so not sending" );
|
||||
}
|
||||
return sent;
|
||||
}
|
||||
|
||||
public boolean relayNoConnProc( byte[] buf, String relayID )
|
||||
|
|
Loading…
Reference in a new issue