diff --git a/src/shared/gatt-helpers.c b/src/shared/gatt-helpers.c
index 3864ed0..c9b24cc 100644
--- a/src/shared/gatt-helpers.c
+++ b/src/shared/gatt-helpers.c
discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto done;
}
done:
if (op->callback)
op->callback(success, att_ecode, final_result, op->user_data);
+
+ discovery_op_unref(op);
}
static void find_by_type_val_cb(uint8_t opcode, const void *pdu,
discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto done;
}
done:
if (op->callback)
op->callback(success, att_ecode, final_result, op->user_data);
+
+ discovery_op_unref(op);
}
static bool discover_services(struct bt_att *att, bt_uuid_t *uuid,
discovery_op_ref(op), discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto done;
}
done:
if (op->callback)
op->callback(success, att_ecode, final_result, op->user_data);
+
+ discovery_op_unref(op);
}
static void read_included(struct read_incl_data *data)
read_included_unref))
return;
- read_included_unref(data);
-
if (op->callback)
op->callback(false, 0, NULL, data->op->user_data);
+
+ read_included_unref(data);
}
static void discover_included_cb(uint8_t opcode, const void *pdu,
discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto failed;
}
failed:
if (op->callback)
op->callback(success, att_ecode, final_result, op->user_data);
+
+ discovery_op_unref(op);
}
bool bt_gatt_discover_included_services(struct bt_att *att,
discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto done;
}
if (op->callback)
op->callback(success, att_ecode, final_result,
op->user_data);
+
+ discovery_op_unref(op);
}
bool bt_gatt_discover_characteristics(struct bt_att *att,
discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto done;
}
if (op->callback)
op->callback(success, att_ecode, success ? op->result_head :
NULL, op->user_data);
+
+ discovery_op_unref(op);
}
bool bt_gatt_read_by_type(struct bt_att *att, uint16_t start, uint16_t end,
discovery_op_unref))
return;
- discovery_op_unref(op);
success = false;
goto done;
}
done:
if (op->callback)
op->callback(success, att_ecode, final_result, op->user_data);
+
+ discovery_op_unref(op);
}
bool bt_gatt_discover_descriptors(struct bt_att *att,