static GIOChannel *avctp_server_socket(gboolean master) { int lm; GIOChannel *io; lm = L2CAP_LM_SECURE; if (master) lm |= L2CAP_LM_MASTER; io = bt_l2cap_listen(BDADDR_ANY, AVCTP_PSM, 0, lm, avctp_server_cb, NULL); if (!io) { error("Unable to allocate new io channel"); return NULL; } return io; }
bt_result_t bt_rfcomm_listen(bt_handle_t handle) { return bt_l2cap_listen(handle); }