make btAddr a string rather than array of bytes.

This commit is contained in:
Eric House 2012-01-31 18:43:26 -08:00
parent edb39ac77d
commit 6326e45892
2 changed files with 4 additions and 5 deletions

View file

@ -473,8 +473,8 @@ addrFromStream( CommsAddrRec* addrP, XWStreamCtxt* stream )
case COMMS_CONN_BT:
stringFromStreamHere( stream, addr.u.bt.hostName,
sizeof(addr.u.bt.hostName) );
stream_getBytes( stream, &addr.u.bt.btAddr.bits,
sizeof(addr.u.bt.btAddr.bits) );
stringFromStreamHere( stream, addr.u.bt.btAddr.chars,
sizeof(addr.u.bt.btAddr.chars) );
break;
case COMMS_CONN_IR:
/* nothing to save */
@ -677,8 +677,7 @@ addrToStream( XWStreamCtxt* stream, const CommsAddrRec* addrP )
case COMMS_CONN_BT:
stringToStream( stream, addr.u.bt.hostName );
/* sizeof(.bits) below defeats ARM's padding. */
stream_putBytes( stream, &addr.u.bt.btAddr.bits,
sizeof(addr.u.bt.btAddr.bits) );
stringToStream( stream, addr.u.bt.btAddr.chars );
break;
case COMMS_CONN_IR:
/* nothing to save */

View file

@ -97,7 +97,7 @@ typedef struct CommsAddrRec {
struct {
/* guests can browse for the host to connect to */
XP_UCHAR hostName[MAX_HOSTNAME_LEN + 1];
XP_BtAddr btAddr;
XP_BtAddrStr btAddr;
} bt;
struct {
XP_UCHAR phone[MAX_PHONE_LEN + 1];