Hi Szymon, On Thu, Mar 24, 2011, Szymon Janc wrote: > +static void remote_oob_data_request(int index, bdaddr_t *bdaddr) > { > struct dev_info *dev = &devs[index]; > + GSList *match; > > DBG("hci%d", index); > > - hci_send_cmd(dev->sk, OGF_LINK_CTL, > - OCF_REMOTE_OOB_DATA_NEG_REPLY, 6, ptr); > + match = g_slist_find_custom(dev->oob_data, bdaddr, oob_bdaddr_cmp); > + > + if (match) { > + struct oob_data *data; > + remote_oob_data_reply_cp cp; > + > + data = match->data; > + > + bacpy(&cp.bdaddr, &data->bdaddr); > + memcpy(cp.hash, data->hash, sizeof(cp.hash)); > + memcpy(cp.randomizer, data->randomizer, sizeof(cp.randomizer)); > + > + dev->oob_data = g_slist_delete_link(dev->oob_data, match); > + > + hci_send_cmd(dev->sk, OGF_LINK_CTL, OCF_REMOTE_OOB_DATA_REPLY, > + REMOTE_OOB_DATA_REPLY_CP_SIZE, &cp); > + > + } else { > + hci_send_cmd(dev->sk, OGF_LINK_CTL, > + OCF_REMOTE_OOB_DATA_NEG_REPLY, 6, bdaddr); > + } > + > } Unnecessary empty line at the end of the function. > + data = g_new(struct oob_data, 1); > + bacpy(&data->bdaddr, bdaddr); > + dev->oob_data = g_slist_prepend(dev->oob_data, data); Probably g_new0 would be better here (doesn't oob_data have more members than just the bdaddr? Johan -- 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