mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
fix crashes rematching from linux a games started on android
Didn't handle the case where a game included NFC or BT. I should probably be stripping those on receipt as I think the android side does when the devices doesn't support 'em. And that in turn should be common/ code. So just fix it for now so testing can continue.
This commit is contained in:
parent
72e813038f
commit
436d3c2ad0
2 changed files with 9 additions and 3 deletions
|
@ -58,6 +58,12 @@ nli_init( NetLaunchInfo* nli, const CurGameInfo* gi, const CommsAddrRec* addr,
|
||||||
case COMMS_CONN_MQTT:
|
case COMMS_CONN_MQTT:
|
||||||
nli_setMQTTDevID( nli, &addr->u.mqtt.devID );
|
nli_setMQTTDevID( nli, &addr->u.mqtt.devID );
|
||||||
break;
|
break;
|
||||||
|
case COMMS_CONN_BT:
|
||||||
|
XP_STRCAT( nli->btAddress, addr->u.bt.btAddr.chars );
|
||||||
|
XP_STRCAT( nli->btName, addr->u.bt.hostName );
|
||||||
|
break;
|
||||||
|
case COMMS_CONN_NFC:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
XP_ASSERT(0);
|
XP_ASSERT(0);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -289,10 +289,10 @@ lbt_register( LinBtStuff* btStuff, unsigned short l2_psm,
|
||||||
// and disconnect
|
// and disconnect
|
||||||
session = sdp_connect( BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY );
|
session = sdp_connect( BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY );
|
||||||
if ( NULL == session ) {
|
if ( NULL == session ) {
|
||||||
XP_LOGF( "%s: sdp_connect->%s", __func__, strerror(errno) );
|
XP_LOGFF( "sdp_connect->%s", strerror(errno) );
|
||||||
|
} else {
|
||||||
|
sdp_record_register( session, &record, 0 );
|
||||||
}
|
}
|
||||||
XP_ASSERT( NULL != session );
|
|
||||||
sdp_record_register( session, &record, 0 );
|
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
sdp_data_free( psm );
|
sdp_data_free( psm );
|
||||||
|
|
Loading…
Add table
Reference in a new issue