diff --git a/common/comms.h b/common/comms.h index c7480ca28..89a9a17d2 100644 --- a/common/comms.h +++ b/common/comms.h @@ -42,6 +42,13 @@ typedef enum { LAST_____FOO } CommsConnType; +/* WHAT SHOULD THIS BE? Copied from Whiteboard.... PENDING */ +#define XW_BT_UUID \ + { 0x83, 0xe0, 0x87, 0xae, 0x4e, 0x18, 0x46, 0xbe, \ + 0x83, 0xe0, 0x7b, 0x3d, 0xe6, 0xa1, 0xc3, 0x3b } + +#define XW_BT_NAME "Crosswords" + /* on Palm BtLibDeviceAddressType is a 48-bit quantity. Linux's typeis the same size. Goal is something all platforms support */ typedef struct XP_BtAddr { XP_U8 bits[6]; } XP_BtAddr; diff --git a/palm/pace_man.c b/palm/pace_man.c index f2b2fa7fa..4a5a14354 100644 --- a/palm/pace_man.c +++ b/palm/pace_man.c @@ -1211,7 +1211,19 @@ btLibSocketEventType68K_TO_ARM( BtLibSocketEventType* out, const unsigned char* out->eventData.data.dataLen = read_unaligned16( &in[6] ); out->eventData.data.data = read_unaligned32( &in[8] ); break; + case btLibSocketEventSdpGetPsmByUuid: + out->eventData.sdpByUuid.param.psm = read_unaligned16( &in[10] ); + break; + + /* These use status and socket only (if anything) */ + case btLibSocketEventConnectRequest: + case btLibSocketEventConnectedOutbound: + case btLibSocketEventSendComplete: + case btLibSocketEventDisconnected: + case btLibL2DiscConnPsmUnsupported: + break; default: /* shut up, compiler */ + XP_ASSERT(0); break; } } diff --git a/palm/palmbt.c b/palm/palmbt.c index 3fa9441ff..79efa75f8 100644 --- a/palm/palmbt.c +++ b/palm/palmbt.c @@ -125,11 +125,10 @@ static void palm_bt_log( const char* btfunc, const char* func, Err err ); #define CALL_ERR(e,f,...) e = f(__VA_ARGS__) #endif -/* WHAT SHOULD THIS BE? Copied from Whiteboard.... PENDING */ static const BtLibSdpUuidType XWORDS_UUID = { btLibUuidSize128, - { 0x83, 0xe0, 0x87, 0xae, 0x4e, 0x18, 0x46, 0xbe, - 0x83, 0xe0, 0x7b, 0x3d, 0xe6, 0xa1, 0xc3, 0x3b } }; + XW_BT_UUID +}; static PalmBTStuff* pbt_checkInit( PalmAppGlobals* globals, XP_Bool* userCancelled ); @@ -494,8 +493,8 @@ setupServiceRecord( PalmBTStuff* btStuff ) if ( errNone == err ) { CALL_ERR( err, BtLibSdpServiceRecordSetAttributesForSocket, btStuff->btLibRefNum, btStuff->u.master.listenSocket, - (BtLibSdpUuidType*)&XWORDS_UUID, 1, APPNAME, - StrLen(APPNAME), btStuff->u.master.sdpRecordH ); + (BtLibSdpUuidType*)&XWORDS_UUID, 1, XW_BT_NAME, + StrLen(XW_BT_NAME), btStuff->u.master.sdpRecordH ); /* 5. BtLibSdpServiceRecordStartAdvertising: make an SDP memory record representing a local SDP service record visible to @@ -1020,7 +1019,7 @@ socketCallback( BtLibSocketEventType* sEvent, UInt32 refCon ) btStuff->u.slave.remotePsm = sEvent->eventData.sdpByUuid.param.psm; SET_STATE( btStuff, PBTST_SDP_QUERIED ); pbt_postpone( btStuff, PBT_ACT_CONNECT_L2C ); - } else if ( sEvent->status == btLibErrSdpQueryDisconnect ) { + } else if ( sEvent->status == btLibErrSdpQueryDisconnect ) { /* Maybe we can just ignore this... */ XP_ASSERT( GET_STATE(btStuff) == PBTST_NONE ); /* waitACL( btStuff ); */