@@ -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) {
@@ -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
@@ -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)
@@ -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)
From: Archie Pusaka <apusaka@chromium.org> "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(-)