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

Method replicate

src/remote/server/server.cpp:3831–3862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3829
3830
3831void rem_port::replicate(P_REPLICATE* repl, PACKET* sendL)
3832{
3833 LocalStatus ls;
3834 CheckStatusWrapper status_vector(&ls);
3835
3836 Rdb* rdb = this->port_context;
3837 if (bad_db(&status_vector, rdb))
3838 {
3839 this->send_response(sendL, 0, 0, &status_vector, false);
3840 return;
3841 }
3842
3843 if (!this->port_replicator)
3844 {
3845 this->port_replicator = rdb->rdb_iface->createReplicator(&status_vector);
3846 check(&status_vector);
3847 fb_assert(this->port_replicator);
3848 }
3849
3850 if (repl->p_repl_data.cstr_length)
3851 {
3852 this->port_replicator->process(&status_vector,
3853 repl->p_repl_data.cstr_length, repl->p_repl_data.cstr_address);
3854 }
3855 else
3856 {
3857 this->port_replicator->close(&status_vector);
3858 this->port_replicator = NULL;
3859 }
3860
3861 this->send_response(sendL, 0, 0, &status_vector, false);
3862}
3863
3864
3865ISC_STATUS rem_port::execute_statement(P_OP op, P_SQLDATA* sqldata, PACKET* sendL)

Callers 1

process_packetFunction · 0.45

Calls 6

send_responseMethod · 0.95
bad_dbFunction · 0.85
checkFunction · 0.50
createReplicatorMethod · 0.45
processMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected