MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / cancel_operation

Function cancel_operation

src/remote/server/server.cpp:2755–2794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2753
2754
2755static void cancel_operation(rem_port* port, USHORT kind)
2756{
2757/**************************************
2758 *
2759 * c a n c e l _ o p e r a t i o n
2760 *
2761 **************************************
2762 *
2763 * Functional description
2764 * Flag a running operation for cancel.
2765 * Service operations are not currently
2766 * able to be canceled.
2767 *
2768 **************************************/
2769 if ((port->port_flags & (PORT_async | PORT_disconnect)) || !(port->port_context))
2770 return;
2771
2772 ServAttachment dbIface;
2773 ServService svcIface;
2774 {
2775 RefMutexGuard portGuard(*port->port_cancel_sync, FB_FUNCTION);
2776
2777 Rdb* rdb = port->port_context;
2778 if ((port->port_flags & PORT_disconnect) || !rdb)
2779 return;
2780
2781 if (rdb->rdb_svc)
2782 svcIface = rdb->rdb_svc->svc_iface;
2783 else
2784 dbIface = rdb->rdb_iface;
2785 }
2786
2787 LocalStatus ls;
2788 CheckStatusWrapper status_vector(&ls);
2789
2790 if (dbIface)
2791 dbIface->cancelOperation(&status_vector, kind);
2792 else if (svcIface && kind == fb_cancel_raise)
2793 svcIface->cancel(&status_vector);
2794}
2795
2796
2797static bool check_request(Rrq* request, USHORT incarnation, USHORT msg_number)

Callers 3

link_requestFunction · 0.85
process_packetFunction · 0.85
asyncReceiveMethod · 0.85

Calls 2

cancelOperationMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected