mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
make btAddr a string rather than array of bytes.
This commit is contained in:
parent
edb39ac77d
commit
6326e45892
2 changed files with 4 additions and 5 deletions
|
@ -473,8 +473,8 @@ addrFromStream( CommsAddrRec* addrP, XWStreamCtxt* stream )
|
||||||
case COMMS_CONN_BT:
|
case COMMS_CONN_BT:
|
||||||
stringFromStreamHere( stream, addr.u.bt.hostName,
|
stringFromStreamHere( stream, addr.u.bt.hostName,
|
||||||
sizeof(addr.u.bt.hostName) );
|
sizeof(addr.u.bt.hostName) );
|
||||||
stream_getBytes( stream, &addr.u.bt.btAddr.bits,
|
stringFromStreamHere( stream, addr.u.bt.btAddr.chars,
|
||||||
sizeof(addr.u.bt.btAddr.bits) );
|
sizeof(addr.u.bt.btAddr.chars) );
|
||||||
break;
|
break;
|
||||||
case COMMS_CONN_IR:
|
case COMMS_CONN_IR:
|
||||||
/* nothing to save */
|
/* nothing to save */
|
||||||
|
@ -677,8 +677,7 @@ addrToStream( XWStreamCtxt* stream, const CommsAddrRec* addrP )
|
||||||
case COMMS_CONN_BT:
|
case COMMS_CONN_BT:
|
||||||
stringToStream( stream, addr.u.bt.hostName );
|
stringToStream( stream, addr.u.bt.hostName );
|
||||||
/* sizeof(.bits) below defeats ARM's padding. */
|
/* sizeof(.bits) below defeats ARM's padding. */
|
||||||
stream_putBytes( stream, &addr.u.bt.btAddr.bits,
|
stringToStream( stream, addr.u.bt.btAddr.chars );
|
||||||
sizeof(addr.u.bt.btAddr.bits) );
|
|
||||||
break;
|
break;
|
||||||
case COMMS_CONN_IR:
|
case COMMS_CONN_IR:
|
||||||
/* nothing to save */
|
/* nothing to save */
|
||||||
|
|
|
@ -97,7 +97,7 @@ typedef struct CommsAddrRec {
|
||||||
struct {
|
struct {
|
||||||
/* guests can browse for the host to connect to */
|
/* guests can browse for the host to connect to */
|
||||||
XP_UCHAR hostName[MAX_HOSTNAME_LEN + 1];
|
XP_UCHAR hostName[MAX_HOSTNAME_LEN + 1];
|
||||||
XP_BtAddr btAddr;
|
XP_BtAddrStr btAddr;
|
||||||
} bt;
|
} bt;
|
||||||
struct {
|
struct {
|
||||||
XP_UCHAR phone[MAX_PHONE_LEN + 1];
|
XP_UCHAR phone[MAX_PHONE_LEN + 1];
|
||||||
|
|
Loading…
Reference in a new issue