Lines Matching refs:cur_obj
41 if (!ots->cur_obj) { in oacp_l2cap_closed()
45 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_l2cap_closed()
100 ots->cur_obj = obj; in oacp_create_proc_validate()
101 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_create_proc_validate()
135 if (!ots->cur_obj) { in oacp_delete_proc_validate()
140 if (!BT_OTS_OBJ_GET_PROP_DELETE(ots->cur_obj->metadata.props)) { in oacp_delete_proc_validate()
145 err = bt_ots_obj_delete(ots, ots->cur_obj->id); in oacp_delete_proc_validate()
180 if (!ots->cur_obj) { in oacp_checksum_proc_validate()
184 if (params->offset > ots->cur_obj->metadata.size.cur) { in oacp_checksum_proc_validate()
188 if ((params->offset + (uint64_t) params->len) > ots->cur_obj->metadata.size.alloc) { in oacp_checksum_proc_validate()
192 if (ots->cur_obj->state.type != BT_GATT_OTS_OBJECT_IDLE_STATE) { in oacp_checksum_proc_validate()
197 err = ots->cb->obj_cal_checksum(ots, conn, ots->cur_obj->id, params->offset, in oacp_checksum_proc_validate()
224 if (!ots->cur_obj) { in oacp_read_proc_validate()
228 if (!BT_OTS_OBJ_GET_PROP_READ(ots->cur_obj->metadata.props)) { in oacp_read_proc_validate()
237 ots->cur_obj->metadata.size.cur) { in oacp_read_proc_validate()
241 if (ots->cur_obj->state.type != BT_GATT_OTS_OBJECT_IDLE_STATE) { in oacp_read_proc_validate()
245 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_READ_OP_STATE; in oacp_read_proc_validate()
246 ots->cur_obj->state.read_op.sent_len = 0; in oacp_read_proc_validate()
247 memcpy(&ots->cur_obj->state.read_op.oacp_params, &proc->read_params, in oacp_read_proc_validate()
248 sizeof(ots->cur_obj->state.read_op.oacp_params)); in oacp_read_proc_validate()
266 if (!ots->cur_obj) { in oacp_write_proc_validate()
270 if (!BT_OTS_OBJ_GET_PROP_WRITE(ots->cur_obj->metadata.props)) { in oacp_write_proc_validate()
275 if (params->offset < ots->cur_obj->metadata.size.cur) { in oacp_write_proc_validate()
279 if (!BT_OTS_OBJ_GET_PROP_PATCH(ots->cur_obj->metadata.props)) { in oacp_write_proc_validate()
297 if (params->offset > ots->cur_obj->metadata.size.cur) { in oacp_write_proc_validate()
302 if ((params->offset + (uint64_t) params->len) > ots->cur_obj->metadata.size.alloc) { in oacp_write_proc_validate()
306 if (ots->cur_obj->state.type != BT_GATT_OTS_OBJECT_IDLE_STATE) { in oacp_write_proc_validate()
312 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_WRITE_OP_STATE; in oacp_write_proc_validate()
313 ots->cur_obj->state.write_op.recv_len = 0; in oacp_write_proc_validate()
314 memcpy(&ots->cur_obj->state.write_op.oacp_params, params, in oacp_write_proc_validate()
315 sizeof(ots->cur_obj->state.write_op.oacp_params)); in oacp_write_proc_validate()
460 !(IS_ENABLED(CONFIG_BT_OTS_DIR_LIST_OBJ) && ots->cur_obj->id == OTS_OBJ_ID_DIR_LIST)) { in oacp_read_proc_cb()
461 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_read_proc_cb()
467 read_op = &ots->cur_obj->state.read_op; in oacp_read_proc_cb()
477 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_read_proc_cb()
480 ots->cur_obj->id == OTS_OBJ_ID_DIR_LIST) { in oacp_read_proc_cb()
484 ots->cb->obj_read(ots, conn, ots->cur_obj->id, NULL, 0, in oacp_read_proc_cb()
491 ots->cur_obj->id == OTS_OBJ_ID_DIR_LIST) { in oacp_read_proc_cb()
495 len = ots->cb->obj_read(ots, conn, ots->cur_obj->id, &obj_chunk, in oacp_read_proc_cb()
503 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_read_proc_cb()
514 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_read_proc_cb()
524 &ots->cur_obj->state.read_op.oacp_params; in oacp_read_proc_execute()
526 if (!ots->cur_obj) { in oacp_read_proc_execute()
550 if (!ots->cur_obj) { in oacp_write_proc_cb()
558 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_write_proc_cb()
562 write_op = &ots->cur_obj->state.write_op; in oacp_write_proc_cb()
571 rc = ots->cb->obj_write(ots, conn, ots->cur_obj->id, buf->data, len, in oacp_write_proc_cb()
586 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_write_proc_cb()
598 ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE; in oacp_write_proc_cb()
601 if (offset + len > ots->cur_obj->metadata.size.cur) { in oacp_write_proc_cb()
602 ots->cur_obj->metadata.size.cur = offset + len; in oacp_write_proc_cb()
617 if (!ots->cur_obj) { in oacp_ind_cb()
622 switch (ots->cur_obj->state.type) { in oacp_ind_cb()
633 LOG_ERR("Unsupported OTS state: %d", ots->cur_obj->state.type); in oacp_ind_cb()