diff --git a/src/remote/client/interface.cpp b/src/remote/client/interface.cpp index 53f400b0fe5..af50f0d1fb5 100644 --- a/src/remote/client/interface.cpp +++ b/src/remote/client/interface.cpp @@ -3333,8 +3333,8 @@ void Batch::cancel(CheckStatusWrapper* status) PACKET* packet = &rdb->rdb_packet; packet->p_operation = op_batch_cancel; - P_BATCH_FREE_CANCEL* batch = &packet->p_batch_free_cancel; - batch->p_batch_statement = statement->rsr_id; + P_RLSE* batch = &packet->p_rlse; + batch->p_rlse_object = statement->rsr_id; send_and_receive(status, rdb, packet); @@ -3367,8 +3367,8 @@ void Batch::freeClientData(CheckStatusWrapper* status, bool force) PACKET* packet = &rdb->rdb_packet; packet->p_operation = op_batch_rls; - P_BATCH_FREE_CANCEL* batch = &packet->p_batch_free_cancel; - batch->p_batch_statement = statement->rsr_id; + P_RLSE* batch = &packet->p_rlse; + batch->p_rlse_object = statement->rsr_id; if (rdb->rdb_port->port_flags & PORT_lazy) { diff --git a/src/remote/protocol.cpp b/src/remote/protocol.cpp index 414971d6e26..8d3f1ce5eca 100644 --- a/src/remote/protocol.cpp +++ b/src/remote/protocol.cpp @@ -544,9 +544,15 @@ bool_t xdr_protocol(RemoteXdr* xdrs, PACKET* p) case op_commit_retaining: case op_rollback_retaining: case op_allocate_statement: + case op_batch_rls: + case op_batch_cancel: release = &p->p_rlse; MAP(xdr_short, reinterpret_cast(release->p_rlse_object)); DEBUG_PRINTSIZE(xdrs, p->p_operation); +#ifdef NEVERDEF + if (xdrs->x_op != XDR_FREE && (p->p_operation == op_batch_rls || p->p_operation == op_batch_cancel)) + DEB_RBATCH(fprintf(stderr, "BatRem: xdr release/cancel %d\n", p->p_operation)); +#endif return P_TRUE(xdrs, p); case op_prepare2: @@ -1081,18 +1087,6 @@ bool_t xdr_protocol(RemoteXdr* xdrs, PACKET* p) return P_TRUE(xdrs, p); } - case op_batch_rls: - case op_batch_cancel: - { - P_BATCH_FREE_CANCEL* b = &p->p_batch_free_cancel; - MAP(xdr_short, reinterpret_cast(b->p_batch_statement)); - - if (xdrs->x_op != XDR_FREE) - DEB_RBATCH(fprintf(stderr, "BatRem: xdr release/cancel %d\n", p->p_operation)); - - return P_TRUE(xdrs, p); - } - case op_batch_sync: { return P_TRUE(xdrs, p); diff --git a/src/remote/protocol.h b/src/remote/protocol.h index 5f0e6c12674..5e0fb12e5bd 100644 --- a/src/remote/protocol.h +++ b/src/remote/protocol.h @@ -750,11 +750,6 @@ typedef struct p_batch_cs // completion state ULONG p_batch_errors; // error's recnums } P_BATCH_CS; -typedef struct p_batch_free_cancel -{ - OBJCT p_batch_statement; // statement object -} P_BATCH_FREE_CANCEL; - typedef struct p_batch_blob { OBJCT p_batch_statement; // statement object @@ -838,7 +833,6 @@ typedef struct packet P_BATCH_CREATE p_batch_create; // Create batch interface P_BATCH_MSG p_batch_msg; // Add messages to batch P_BATCH_EXEC p_batch_exec; // Run batch - P_BATCH_FREE_CANCEL p_batch_free_cancel; // Cancel or destroy batch P_BATCH_CS p_batch_cs; // Batch completion state P_BATCH_BLOB p_batch_blob; // BLOB stream portion in batch P_BATCH_REGBLOB p_batch_regblob; // Register already existing BLOB in batch diff --git a/src/remote/remote.h b/src/remote/remote.h index 76447de0603..186c38cc9f2 100644 --- a/src/remote/remote.h +++ b/src/remote/remote.h @@ -1725,8 +1725,8 @@ struct rem_port : public Firebird::GlobalStorage, public Firebird::RefCounted void batch_blob_stream(P_BATCH_BLOB*, PACKET*); void batch_regblob(P_BATCH_REGBLOB*, PACKET*); void batch_exec(P_BATCH_EXEC*, PACKET*); - void batch_rls(P_BATCH_FREE_CANCEL*, PACKET*); - void batch_cancel(P_BATCH_FREE_CANCEL*, PACKET*); + void batch_rls(P_RLSE*, PACKET*); + void batch_cancel(P_RLSE*, PACKET*); void batch_sync(PACKET*); void batch_bpb(P_BATCH_SETBPB*, PACKET*); void replicate(P_REPLICATE*, PACKET*); diff --git a/src/remote/server/server.cpp b/src/remote/server/server.cpp index bb84ec1f83a..1e6e85340bc 100644 --- a/src/remote/server/server.cpp +++ b/src/remote/server/server.cpp @@ -3810,13 +3810,13 @@ void rem_port::batch_exec(P_BATCH_EXEC* batch, PACKET* sendL) } -void rem_port::batch_rls(P_BATCH_FREE_CANCEL* batch, PACKET* sendL) +void rem_port::batch_rls(P_RLSE* batch, PACKET* sendL) { LocalStatus ls; CheckStatusWrapper status_vector(&ls); Rsr* statement; - getHandle(statement, batch->p_batch_statement); + getHandle(statement, batch->p_rlse_object); statement->checkIface(); statement->checkBatch(); @@ -3827,13 +3827,13 @@ void rem_port::batch_rls(P_BATCH_FREE_CANCEL* batch, PACKET* sendL) } -void rem_port::batch_cancel(P_BATCH_FREE_CANCEL* batch, PACKET* sendL) +void rem_port::batch_cancel(P_RLSE* batch, PACKET* sendL) { LocalStatus ls; CheckStatusWrapper status_vector(&ls); Rsr* statement; - getHandle(statement, batch->p_batch_statement); + getHandle(statement, batch->p_rlse_object); statement->checkIface(); statement->checkBatch(); @@ -5324,11 +5324,11 @@ static bool process_packet(rem_port* port, PACKET* sendL, PACKET* receive, rem_p break; case op_batch_rls: - port->batch_rls(&receive->p_batch_free_cancel, sendL); + port->batch_rls(&receive->p_rlse, sendL); break; case op_batch_cancel: - port->batch_cancel(&receive->p_batch_free_cancel, sendL); + port->batch_cancel(&receive->p_rlse, sendL); break; case op_batch_sync: