136
local_purl = slapi_ch_smprintf("ldap://%s:%s", host, port);
136
if(slapi_is_ipv6_addr(host)){
137
/* need to put brackets around the ipv6 address */
138
local_purl = slapi_ch_smprintf("ldap://[%s]:%s", host, port);
140
local_purl = slapi_ch_smprintf("ldap://%s:%s", host, port);
139
144
/* slapi_ch_free acceptS NULL pointer */
477
PR_ASSERT(0); /* JCMREPL - A Replicated Operation with no Repl Baggage control... What does that mean? */
482
/* PR_ASSERT(0); JCMREPL - A Replicated Operation with no Repl Baggage control... What does that mean? */
484
* This could be RI plugin responding to a replicated update from AD or some other master that is not
485
* using the RI plugin, so don't PR_ASSERT here. This only happens if we configure the RI plugin with
486
* "nsslapd-pluginAllowReplUpdates: on", also the RI plugin only issues "modifies".
706
717
if (!is_fixup_operation)
708
719
slapi_pblock_set(pb, SLAPI_TXN_RUV_MODS_FN,
709
(void *)replica_ruv_smods_for_op);
710
if (is_replicated_operation) {
720
(void *)replica_ruv_smods_for_op);
721
if (!repl5_is_betxn && is_replicated_operation) {
722
/* if is_betxn is on, urp is called at betxn preop */
711
723
rc = urp_add_operation(pb);
731
743
if(!is_fixup_operation)
733
745
slapi_pblock_set(pb, SLAPI_TXN_RUV_MODS_FN,
734
(void *)replica_ruv_smods_for_op);
735
if (is_replicated_operation) {
746
(void *)replica_ruv_smods_for_op);
747
if (!repl5_is_betxn && is_replicated_operation) {
748
/* if is_betxn is on, urp is called at betxn preop */
736
749
rc = urp_delete_operation(pb);
756
769
if(!is_fixup_operation)
758
771
slapi_pblock_set(pb, SLAPI_TXN_RUV_MODS_FN,
759
(void *)replica_ruv_smods_for_op);
760
if (is_replicated_operation) {
772
(void *)replica_ruv_smods_for_op);
773
if (!repl5_is_betxn && is_replicated_operation) {
774
/* if is_betxn is on, urp is called at betxn preop */
761
775
rc = urp_modify_operation(pb);
784
798
if(!is_fixup_operation)
786
800
slapi_pblock_set(pb, SLAPI_TXN_RUV_MODS_FN,
787
(void *)replica_ruv_smods_for_op);
788
if (is_replicated_operation) {
801
(void *)replica_ruv_smods_for_op);
802
if (!repl5_is_betxn && is_replicated_operation) {
803
/* if is_betxn is on, urp is called at betxn preop */
789
804
rc = urp_modrdn_operation(pb);
816
multimaster_betxnpreop_add (Slapi_PBlock *pb)
820
int is_replicated_operation;
821
int is_fixup_operation;
823
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
824
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
825
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
827
/* For replicated operations, apply URP algorithm */
828
if (!is_fixup_operation)
830
if (is_replicated_operation) {
831
rc = urp_add_operation(pb);
839
multimaster_betxnpreop_delete (Slapi_PBlock *pb)
843
int is_replicated_operation;
844
int is_fixup_operation;
846
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
847
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
848
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
850
/* For replicated operations, apply URP algorithm */
851
if(!is_fixup_operation)
853
if (is_replicated_operation) {
854
rc = urp_delete_operation(pb);
862
multimaster_betxnpreop_modify (Slapi_PBlock *pb)
866
int is_replicated_operation;
867
int is_fixup_operation;
869
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
870
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
871
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
873
/* For replicated operations, apply URP algorithm */
874
if(!is_fixup_operation)
876
if (is_replicated_operation) {
877
rc = urp_modify_operation(pb);
885
multimaster_betxnpreop_modrdn (Slapi_PBlock *pb)
889
int is_replicated_operation;
890
int is_fixup_operation;
892
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
893
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
894
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
896
/* For replicated operations, apply URP algorithm */
897
if(!is_fixup_operation)
899
if (is_replicated_operation) {
900
rc = urp_modrdn_operation(pb);
800
908
multimaster_bepostop_modrdn (Slapi_PBlock *pb)
877
985
return write_changelog_and_ruv(pb);
988
/* If nsslapd-pluginbetxn is on */
990
multimaster_be_betxnpostop_delete (Slapi_PBlock *pb)
993
/* original betxnpost */
994
rc = write_changelog_and_ruv(pb);
995
/* original bepost */
996
rc |= multimaster_bepostop_delete(pb);
1001
multimaster_be_betxnpostop_modrdn (Slapi_PBlock *pb)
1004
/* original betxnpost */
1005
rc = write_changelog_and_ruv(pb);
1006
/* original bepost */
1007
rc |= multimaster_bepostop_modrdn(pb);
1012
multimaster_be_betxnpostop_add (Slapi_PBlock *pb)
1015
/* original betxnpost */
1016
rc = write_changelog_and_ruv(pb);
1021
multimaster_be_betxnpostop_modify (Slapi_PBlock *pb)
1024
/* original betxnpost */
1025
rc = write_changelog_and_ruv(pb);
880
1029
/* Helper functions */