/* Handles an incoming ATT error response for the specified write-long-characteristic-value proc.  */
static void ble_gattc_write_long_err(struct ble_gattc_proc *proc, int status, uint16_t att_handle)
/* Handles an incoming ATT error response for the specified write-long-characteristic-value proc.  */
static void ble_gattc_write_long_err(struct ble_gattc_proc *proc, int status, uint16_t att_handle)
{
    ble_gattc_dbg_assert_proc_not_inserted(proc);
    if (proc->write_long.attr.offset > 0 &&
        proc->write_long.attr.offset <
            OS_MBUF_PKTLEN(proc->write_long.attr.om)) {
        ble_att_clt_tx_exec_write(proc->conn_handle,
                                  BLE_ATT_EXEC_WRITE_F_CANCEL);
    }
    ble_gattc_write_long_cb(proc, status, att_handle);
}