--- mcap/mcap.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mcap/mcap.c b/mcap/mcap.c index 1d33452..ff6766d 100644 --- a/mcap/mcap.c +++ b/mcap/mcap.c @@ -955,8 +955,6 @@ static void process_md_create_mdl_req(struct mcap_mcl *mcl, uint8_t *cmd, return; } - cfga = conf = req->conf; - mdl = get_mdl(mcl, mdl_id); if (mdl && mdl->state == MDL_WAITING) { /* A remote petition is also triying to connect this mdl_id @@ -964,7 +962,9 @@ static void process_md_create_mdl_req(struct mcap_mcl *mcl, uint8_t *cmd, send4B_cmd(mcl, MCAP_MD_CREATE_MDL_RSP, MCAP_MDL_BUSY, mdl_id); return; } + /* Callback to upper layer */ + cfga = conf = req->conf; rsp = mcl->cb->mdl_conn_req(mcl, mdep_id, mdl_id, &conf, mcl->cb->user_data); if (mcl->state == MCL_IDLE) { @@ -985,7 +985,6 @@ static void process_md_create_mdl_req(struct mcap_mcl *mcl, uint8_t *cmd, return; } - if (!mdl) { mdl = g_malloc0(sizeof(struct mcap_mdl)); mdl->mcl = mcl; -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html