Skip to contentSkip to conversation

Get mode option for L2CAP sockets

PATCH In review Santiago Carot-Nemesio 2 participants 2 messages Oct 18, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Get mode option for L2CAP sockets

---
 btio/btio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
btio/btio.c +3 -0
index 2f719b1..d8439e0 100644
@@ -839,6 +839,9 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
 			}
 			memcpy(va_arg(args, uint8_t *), dev_class, 3);
 			break;
+		case BT_IO_OPT_MODE:
+			*(va_arg(args, uint8_t *)) = l2o.mode;
+			break;
 		default:
 			g_set_error(err, BT_IO_ERROR, BT_IO_ERROR_INVALID_ARGS,
 					"Unknown option %d", opt);
Signature · 1 line
1.7.3.1
#1 lore raw

Hi,

Quoted 9 lines · Santiago Carot-Nemesio
---
 btio/btio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
btio/btio.c +0 -0
index 2f719b1..d8439e0 100644

btio/btio.c static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, · line 847

Quoted 9 lines
btio/btio.c +3 -0
@@ -839,6 +839,9 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
 			}
 			memcpy(va_arg(args, uint8_t *), dev_class, 3);
 			break;
+		case BT_IO_OPT_MODE:
+			*(va_arg(args, uint8_t *)) = l2o.mode;
+			break;
 		default:
 			g_set_error(err, BT_IO_ERROR, BT_IO_ERROR_INVALID_ARGS,
 					"Unknown option %d", opt);

Pushed upstream. Thanks.

Johan