diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2012-01-24 10:57:21 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-01-24 16:19:24 +0200 |
commit | efeb4cdb12056cde882e72a7087dc3c0e6deca5e (patch) | |
tree | abbdfd707fb6371f2120471c10ef68bf836de62e /test | |
parent | 3ad251fe23beec146be2326849b647e8d7d63f68 (diff) |
test: Add support for btiotest to returning the key size
Diffstat (limited to 'test')
-rw-r--r-- | test/btiotest.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/btiotest.c b/test/btiotest.c index f02711d16..03f026d1e 100644 --- a/test/btiotest.c +++ b/test/btiotest.c @@ -135,6 +135,19 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data) printf("imtu=%u, omtu=%u\n", imtu, omtu); } + if (data->type == BT_IO_L2CAP) { + uint8_t key_size; + + if (!bt_io_get(io, data->type, &err, + BT_IO_OPT_KEY_SIZE, &key_size, + BT_IO_OPT_INVALID)) { + printf("Unable to get L2CAP Key size: %s\n", + err->message); + g_clear_error(&err); + } else + printf("key_size=%u\n", key_size); + } + if (data->disconn == 0) { g_io_channel_shutdown(io, TRUE, NULL); printf("Disconnected\n"); |