/* Calls a read-multiple-characteristics proc's callback with the specified parameters. If the proc has no callback, this function is a no-op. */
static int ble_gattc_read_mult_cb(struct ble_gattc_proc *proc, int status, uint16_t att_handle, struct os_mbuf **om)
/* Calls a read-multiple-characteristics proc's callback with the specified parameters. If the proc has no callback, this function is a no-op. */
static int ble_gattc_read_mult_cb(struct ble_gattc_proc *proc, int status, uint16_t att_handle, struct os_mbuf **om)
{
    struct ble_gatt_attr attr;
    int rc;
    BLE_HS_DBG_ASSERT(!ble_hs_locked_by_cur_task());
    BLE_HS_DBG_ASSERT(om != NULL || status != 0);
    ble_gattc_dbg_assert_proc_not_inserted(proc);
    if (status != 0 && status != BLE_HS_EDONE) {
        STATS_INC(ble_gattc_stats, read_mult_fail);
    }
    attr.handle = 0;
    attr.offset = 0;
    if (om == NULL) {
        attr.om = NULL;
    } else {
        attr.om = *om;
    }
    if (proc->read_mult.cb == NULL) {
        rc = 0;
    } else {
        rc = proc->read_mult.cb(proc->conn_handle,
                                ble_gattc_error(status, att_handle), &attr,
                                proc->read_mult.cb_arg);
    }
    if (om != NULL) {
        *om = attr.om;
    }
    return rc;
}