/* Calls a discover-service-by-uuid proc's callback with the specified parameters. If the proc has no callback, this function is a no-op. */
static int ble_gattc_disc_svc_uuid_cb(struct ble_gattc_proc *proc, int status, uint16_t att_handle, struct ble_gatt_svc *service)
/* Calls a discover-service-by-uuid proc's callback with the specified parameters. If the proc has no callback, this function is a no-op. */
static int ble_gattc_disc_svc_uuid_cb(struct ble_gattc_proc *proc, int status, uint16_t att_handle, struct ble_gatt_svc *service)
{
    int rc;
    BLE_HS_DBG_ASSERT(!ble_hs_locked_by_cur_task());
    BLE_HS_DBG_ASSERT(service != NULL || status != 0);
    ble_gattc_dbg_assert_proc_not_inserted(proc);
    if (status != 0 && status != BLE_HS_EDONE) {
        STATS_INC(ble_gattc_stats, disc_svc_uuid_fail);
    }
    if (proc->disc_svc_uuid.cb == NULL) {
        rc = 0;
    } else {
        rc = proc->disc_svc_uuid.cb(proc->conn_handle,
                                    ble_gattc_error(status, att_handle),
                                    service, proc->disc_svc_uuid.cb_arg);
    }
    return rc;
}