/* Calls a write-long-characteristic-value proc's callback with the specified parameters. If the proc has no callback, this function is a no-op. */
static int ble_gattc_write_reliable_cb(struct ble_gattc_proc *proc, int status, uint16_t att_handle)
/* Calls a write-long-characteristic-value proc's callback with the specified parameters. If the proc has no callback, this function is a no-op. */
static int ble_gattc_write_reliable_cb(struct ble_gattc_proc *proc, int status, uint16_t att_handle)
{
    int rc;
    BLE_HS_DBG_ASSERT(!ble_hs_locked_by_cur_task());
    ble_gattc_dbg_assert_proc_not_inserted(proc);
    if (status != 0 && status != BLE_HS_EDONE) {
        STATS_INC(ble_gattc_stats, write_reliable_fail);
    }
    if (proc->write_reliable.cb == NULL) {
        rc = 0;
    } else {
        rc = proc->write_reliable.cb(proc->conn_handle,
                                     ble_gattc_error(status, att_handle),
                                     proc->write_reliable.attrs,
                                     proc->write_reliable.num_attrs,
                                     proc->write_reliable.cb_arg);
    }
    return rc;
}