@@ -369,13 +369,13 @@ static int l2cap_set_master(int sock, int master)
return -errno;
if (master) {
- if (flags & L2CAP_LM_MASTER)
+ if (flags & L2CAP_LM_CENTRAL)
return 0;
- flags |= L2CAP_LM_MASTER;
+ flags |= L2CAP_LM_CENTRAL;
} else {
- if (!(flags & L2CAP_LM_MASTER))
+ if (!(flags & L2CAP_LM_CENTRAL))
return 0;
- flags &= ~L2CAP_LM_MASTER;
+ flags &= ~L2CAP_LM_CENTRAL;
}
if (setsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, sizeof(flags)) < 0)
@@ -1180,7 +1180,7 @@ parse_opts:
return FALSE;
}
*(va_arg(args, gboolean *)) =
- (flags & L2CAP_LM_MASTER) ? TRUE : FALSE;
+ (flags & L2CAP_LM_CENTRAL) ? TRUE : FALSE;
break;
case BT_IO_OPT_HANDLE:
if (l2cap_get_info(sock, &handle, dev_class) < 0) {
@@ -52,7 +52,7 @@ struct l2cap_conninfo {
};
#define L2CAP_LM 0x03
-#define L2CAP_LM_MASTER 0x0001
+#define L2CAP_LM_CENTRAL 0x0001
#define L2CAP_LM_AUTH 0x0002
#define L2CAP_LM_ENCRYPT 0x0004
#define L2CAP_LM_TRUSTED 0x0008
@@ -2426,7 +2426,7 @@ static gboolean get_btrole(struct mcap_mcl *mcl)
if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, &len))
DBG("CSP: could not read role");
- return flags & L2CAP_LM_MASTER;
+ return flags & L2CAP_LM_CENTRAL;
}
uint64_t mcap_get_timestamp(struct mcap_mcl *mcl,
@@ -72,7 +72,7 @@ static int init_server(uint16_t mtu, int master, int compat)
}
if (master) {
- int opt = L2CAP_LM_MASTER;
+ int opt = L2CAP_LM_CENTRAL;
if (setsockopt(l2cap_sock, SOL_L2CAP, L2CAP_LM, &opt, sizeof(opt)) < 0) {
error("setsockopt: %s", strerror(errno));
return -1;
@@ -484,7 +484,7 @@ static int do_connect(char *svr)
if (reliable)
opt |= L2CAP_LM_RELIABLE;
if (master)
- opt |= L2CAP_LM_MASTER;
+ opt |= L2CAP_LM_CENTRAL;
if (auth)
opt |= L2CAP_LM_AUTH;
if (encr)
@@ -587,7 +587,7 @@ static void do_listen(void (*handler)(int sk))
if (reliable)
opt |= L2CAP_LM_RELIABLE;
if (master)
- opt |= L2CAP_LM_MASTER;
+ opt |= L2CAP_LM_CENTRAL;
if (auth)
opt |= L2CAP_LM_AUTH;
if (encr)
From: Archie Pusaka <apusaka@chromium.org> "central" is preferred, as reflected on the BT core spec 5.3. --- btio/btio.c | 10 +++++----- lib/l2cap.h | 2 +- profiles/health/mcap.c | 2 +- src/sdpd-server.c | 2 +- tools/l2test.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)