| 10001 | |
| 10002 | |
| 10003 | void Attachment::cancelOperation(CheckStatusWrapper* status, int kind) |
| 10004 | { |
| 10005 | /************************************* |
| 10006 | * |
| 10007 | * G D S _ C A N C E L _ O P E R A T I O N |
| 10008 | * |
| 10009 | ************************************** |
| 10010 | * |
| 10011 | * Functional description |
| 10012 | * Asynchronously cancel requests, running with db_handle on remote server. |
| 10013 | * |
| 10014 | **************************************/ |
| 10015 | |
| 10016 | try { |
| 10017 | reset(status); |
| 10018 | CHECK_HANDLE(rdb, isc_bad_db_handle); |
| 10019 | RemPortPtr port(rdb->rdb_port); |
| 10020 | |
| 10021 | if (kind == fb_cancel_abort) |
| 10022 | { |
| 10023 | port->force_close(); |
| 10024 | return; |
| 10025 | } |
| 10026 | |
| 10027 | if (port->port_protocol < PROTOCOL_VERSION12 || port->port_type != rem_port::INET) |
| 10028 | { |
| 10029 | unsupported(); |
| 10030 | } |
| 10031 | |
| 10032 | Cleanup unlockAsyncLock([this] { --(rdb->rdb_async_lock); }); |
| 10033 | if (++(rdb->rdb_async_lock) != 1) |
| 10034 | { |
| 10035 | // Something async already runs |
| 10036 | Arg::Gds(isc_async_active).raise(); |
| 10037 | } |
| 10038 | |
| 10039 | PACKET packet; |
| 10040 | packet.p_operation = op_cancel; |
| 10041 | P_CANCEL_OP* cancel = &packet.p_cancel_op; |
| 10042 | cancel->p_co_kind = kind; |
| 10043 | |
| 10044 | send_packet(rdb->rdb_port, &packet); |
| 10045 | } |
| 10046 | catch (const Exception& ex) |
| 10047 | { |
| 10048 | ex.stuffException(status); |
| 10049 | } |
| 10050 | } |
| 10051 | |
| 10052 | Rtr* Attachment::remoteTransaction(ITransaction* apiTra) |
| 10053 | { |
no test coverage detected