diff --git a/test/btiotest.c b/test/btiotest.c
index 91fc1d5..f02711d 100644
--- a/test/btiotest.c
+++ b/test/btiotest.c
}
static void l2cap_connect(const char *src, const char *dst, uint16_t psm,
- gint disconn, gint sec,
- gint prio)
+ uint16_t cid, gint disconn,
+ gint sec, gint prio)
{
struct io_data *data;
GError *err = NULL;
BT_IO_OPT_SOURCE, src,
BT_IO_OPT_DEST, dst,
BT_IO_OPT_PSM, psm,
+ BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
BT_IO_OPT_PRIORITY, prio,
BT_IO_OPT_INVALID);
&err,
BT_IO_OPT_DEST, dst,
BT_IO_OPT_PSM, psm,
+ BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
BT_IO_OPT_PRIORITY, prio,
BT_IO_OPT_INVALID);
static gint opt_sec = 0;
static gboolean opt_master = FALSE;
static gint opt_priority = 0;
+static gint opt_cid = 0;
static GMainLoop *main_loop;
"RFCOMM channel" },
{ "psm", 'p', 0, G_OPTION_ARG_INT, &opt_psm,
"L2CAP PSM" },
+ { "cid", 'j', 0, G_OPTION_ARG_INT, &opt_cid,
+ "L2CAP CID" },
{ "sco", 's', 0, G_OPTION_ARG_NONE, &opt_sco,
"Use SCO" },
{ "defer", 'd', 0, G_OPTION_ARG_NONE, &opt_defer,
opt_accept, opt_reject, opt_disconn, opt_defer, opt_sec,
opt_priority);
- if (opt_psm) {
+ if (opt_psm || opt_cid) {
if (argc > 1)
- l2cap_connect(opt_dev, argv[1], opt_psm,
- opt_disconn, opt_sec,
- opt_priority);
+ l2cap_connect(opt_dev, argv[1], opt_psm, opt_cid,
+ opt_disconn, opt_sec, opt_priority);
else
l2cap_listen(opt_dev, opt_psm, opt_defer, opt_reject,
opt_disconn, opt_accept, opt_sec,