From: Archie Pusaka <apusaka@xxxxxxxxxxxx> "central" is preferred, as reflected in the BT core spec 5.3. --- btio/btio.c | 10 +++++----- lib/rfcomm.h | 2 +- tools/rctest.c | 4 ++-- tools/rfcomm.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/btio/btio.c b/btio/btio.c index 9c4601e6f8..ce958bdd09 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -394,13 +394,13 @@ static int rfcomm_set_master(int sock, int master) return -errno; if (master) { - if (flags & RFCOMM_LM_MASTER) + if (flags & RFCOMM_LM_CENTRAL) return 0; - flags |= RFCOMM_LM_MASTER; + flags |= RFCOMM_LM_CENTRAL; } else { - if (!(flags & RFCOMM_LM_MASTER)) + if (!(flags & RFCOMM_LM_CENTRAL)) return 0; - flags &= ~RFCOMM_LM_MASTER; + flags &= ~RFCOMM_LM_CENTRAL; } if (setsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags, sizeof(flags)) < 0) @@ -1345,7 +1345,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1, return FALSE; } *(va_arg(args, gboolean *)) = - (flags & RFCOMM_LM_MASTER) ? TRUE : FALSE; + (flags & RFCOMM_LM_CENTRAL) ? TRUE : FALSE; break; case BT_IO_OPT_HANDLE: if (rfcomm_get_info(sock, &handle, dev_class) < 0) { diff --git a/lib/rfcomm.h b/lib/rfcomm.h index 0347ddc367..ab1df888c2 100644 --- a/lib/rfcomm.h +++ b/lib/rfcomm.h @@ -38,7 +38,7 @@ struct rfcomm_conninfo { }; #define RFCOMM_LM 0x03 -#define RFCOMM_LM_MASTER 0x0001 +#define RFCOMM_LM_CENTRAL 0x0001 #define RFCOMM_LM_AUTH 0x0002 #define RFCOMM_LM_ENCRYPT 0x0004 #define RFCOMM_LM_TRUSTED 0x0008 diff --git a/tools/rctest.c b/tools/rctest.c index 7d688691c4..034ae167b2 100644 --- a/tools/rctest.c +++ b/tools/rctest.c @@ -203,7 +203,7 @@ static int do_connect(const char *svr) /* Set link mode */ opt = 0; if (master) - opt |= RFCOMM_LM_MASTER; + opt |= RFCOMM_LM_CENTRAL; if (auth) opt |= RFCOMM_LM_AUTH; if (encr) @@ -294,7 +294,7 @@ static void do_listen(void (*handler)(int sk)) /* Set link mode */ opt = 0; if (master) - opt |= RFCOMM_LM_MASTER; + opt |= RFCOMM_LM_CENTRAL; if (auth) opt |= RFCOMM_LM_AUTH; if (encr) diff --git a/tools/rfcomm.c b/tools/rfcomm.c index 8e1db8ebaa..7ad7ca5ad6 100644 --- a/tools/rfcomm.c +++ b/tools/rfcomm.c @@ -435,7 +435,7 @@ static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv lm = 0; if (master) - lm |= RFCOMM_LM_MASTER; + lm |= RFCOMM_LM_CENTRAL; if (auth) lm |= RFCOMM_LM_AUTH; if (encryption) -- 2.33.0.rc1.237.g0d66db33f3-goog