mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r25549: Convert to standard bool type.
(This used to be commit 318bf1f744
)
This commit is contained in:
parent
2f1c0eca13
commit
af0a85bc30
@ -75,77 +75,77 @@ static enum _R_ACTION replace_same_owner(struct winsdb_record *r1, struct wrepl_
|
|||||||
return R_DO_REPLACE;
|
return R_DO_REPLACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL r_1_is_subset_of_2_address_list(struct winsdb_record *r1, struct wrepl_name *r2, BOOL check_owners)
|
static bool r_1_is_subset_of_2_address_list(struct winsdb_record *r1, struct wrepl_name *r2, bool check_owners)
|
||||||
{
|
{
|
||||||
uint32_t i,j;
|
uint32_t i,j;
|
||||||
size_t len = winsdb_addr_list_length(r1->addresses);
|
size_t len = winsdb_addr_list_length(r1->addresses);
|
||||||
|
|
||||||
for (i=0; i < len; i++) {
|
for (i=0; i < len; i++) {
|
||||||
BOOL found = False;
|
bool found = false;
|
||||||
for (j=0; j < r2->num_addresses; j++) {
|
for (j=0; j < r2->num_addresses; j++) {
|
||||||
if (strcmp(r1->addresses[i]->address, r2->addresses[j].address) != 0) {
|
if (strcmp(r1->addresses[i]->address, r2->addresses[j].address) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_owners && strcmp(r1->addresses[i]->wins_owner, r2->addresses[j].owner) != 0) {
|
if (check_owners && strcmp(r1->addresses[i]->wins_owner, r2->addresses[j].owner) != 0) {
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
found = True;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!found) return False;
|
if (!found) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL r_1_is_superset_of_2_address_list(struct winsdb_record *r1, struct wrepl_name *r2, BOOL check_owners)
|
static bool r_1_is_superset_of_2_address_list(struct winsdb_record *r1, struct wrepl_name *r2, bool check_owners)
|
||||||
{
|
{
|
||||||
uint32_t i,j;
|
uint32_t i,j;
|
||||||
size_t len = winsdb_addr_list_length(r1->addresses);
|
size_t len = winsdb_addr_list_length(r1->addresses);
|
||||||
|
|
||||||
for (i=0; i < r2->num_addresses; i++) {
|
for (i=0; i < r2->num_addresses; i++) {
|
||||||
BOOL found = False;
|
bool found = false;
|
||||||
for (j=0; j < len; j++) {
|
for (j=0; j < len; j++) {
|
||||||
if (strcmp(r2->addresses[i].address, r1->addresses[j]->address) != 0) {
|
if (strcmp(r2->addresses[i].address, r1->addresses[j]->address) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_owners && strcmp(r2->addresses[i].owner, r1->addresses[j]->wins_owner) != 0) {
|
if (check_owners && strcmp(r2->addresses[i].owner, r1->addresses[j]->wins_owner) != 0) {
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
found = True;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!found) return False;
|
if (!found) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL r_1_is_same_as_2_address_list(struct winsdb_record *r1, struct wrepl_name *r2, BOOL check_owners)
|
static bool r_1_is_same_as_2_address_list(struct winsdb_record *r1, struct wrepl_name *r2, bool check_owners)
|
||||||
{
|
{
|
||||||
size_t len = winsdb_addr_list_length(r1->addresses);
|
size_t len = winsdb_addr_list_length(r1->addresses);
|
||||||
|
|
||||||
if (len != r2->num_addresses) {
|
if (len != r2->num_addresses) {
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return r_1_is_superset_of_2_address_list(r1, r2, check_owners);
|
return r_1_is_superset_of_2_address_list(r1, r2, check_owners);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL r_contains_addrs_from_owner(struct winsdb_record *r1, const char *owner)
|
static bool r_contains_addrs_from_owner(struct winsdb_record *r1, const char *owner)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
size_t len = winsdb_addr_list_length(r1->addresses);
|
size_t len = winsdb_addr_list_length(r1->addresses);
|
||||||
|
|
||||||
for (i=0; i < len; i++) {
|
for (i=0; i < len; i++) {
|
||||||
if (strcmp(r1->addresses[i]->wins_owner, owner) == 0) {
|
if (strcmp(r1->addresses[i]->wins_owner, owner) == 0) {
|
||||||
return True;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -310,12 +310,12 @@ static enum _R_ACTION replace_sgroup_replica_vs_X_replica(struct winsdb_record *
|
|||||||
return R_NOT_REPLACE;
|
return R_NOT_REPLACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_1_is_superset_of_2_address_list(r1, r2, True)) {
|
if (r_1_is_superset_of_2_address_list(r1, r2, true)) {
|
||||||
/* NOT REPLACE */
|
/* NOT REPLACE */
|
||||||
return R_NOT_REPLACE;
|
return R_NOT_REPLACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_1_is_same_as_2_address_list(r1, r2, False)) {
|
if (r_1_is_same_as_2_address_list(r1, r2, false)) {
|
||||||
/* REPLACE */
|
/* REPLACE */
|
||||||
return R_DO_REPLACE;
|
return R_DO_REPLACE;
|
||||||
}
|
}
|
||||||
@ -433,7 +433,7 @@ static enum _R_ACTION replace_unique_owned_vs_X_replica(struct winsdb_record *r1
|
|||||||
* is unique,active,replica or mhomed,active,replica
|
* is unique,active,replica or mhomed,active,replica
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (r_1_is_subset_of_2_address_list(r1, r2, False)) {
|
if (r_1_is_subset_of_2_address_list(r1, r2, false)) {
|
||||||
/*
|
/*
|
||||||
* if r1 has a subset(or same) of the addresses of r2
|
* if r1 has a subset(or same) of the addresses of r2
|
||||||
* <=>
|
* <=>
|
||||||
@ -559,7 +559,7 @@ static enum _R_ACTION replace_sgroup_owned_vs_X_replica(struct winsdb_record *r1
|
|||||||
return R_DO_PROPAGATE;
|
return R_DO_PROPAGATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_1_is_same_as_2_address_list(r1, r2, True)) {
|
if (r_1_is_same_as_2_address_list(r1, r2, true)) {
|
||||||
/*
|
/*
|
||||||
* as we're the old owner and the addresses and their
|
* as we're the old owner and the addresses and their
|
||||||
* owners are identical
|
* owners are identical
|
||||||
@ -645,7 +645,7 @@ static enum _R_ACTION replace_mhomed_owned_vs_X_replica(struct winsdb_record *r1
|
|||||||
* is unique,active,replica or mhomed,active,replica
|
* is unique,active,replica or mhomed,active,replica
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (r_1_is_subset_of_2_address_list(r1, r2, False)) {
|
if (r_1_is_subset_of_2_address_list(r1, r2, false)) {
|
||||||
/*
|
/*
|
||||||
* if r1 has a subset(or same) of the addresses of r2
|
* if r1 has a subset(or same) of the addresses of r2
|
||||||
* <=>
|
* <=>
|
||||||
@ -695,7 +695,7 @@ static NTSTATUS r_do_add(struct wreplsrv_partner *partner,
|
|||||||
replica->addresses[i].address,
|
replica->addresses[i].address,
|
||||||
replica->addresses[i].owner,
|
replica->addresses[i].owner,
|
||||||
rec->expire_time,
|
rec->expire_time,
|
||||||
False);
|
false);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(rec->addresses);
|
NT_STATUS_HAVE_NO_MEMORY(rec->addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -740,7 +740,7 @@ static NTSTATUS r_do_replace(struct wreplsrv_partner *partner,
|
|||||||
replica->addresses[i].address,
|
replica->addresses[i].address,
|
||||||
replica->addresses[i].owner,
|
replica->addresses[i].owner,
|
||||||
rec->expire_time,
|
rec->expire_time,
|
||||||
False);
|
false);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(rec->addresses);
|
NT_STATUS_HAVE_NO_MEMORY(rec->addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -842,17 +842,17 @@ static NTSTATUS r_do_mhomed_merge(struct wreplsrv_partner *partner,
|
|||||||
replica->addresses[i].address,
|
replica->addresses[i].address,
|
||||||
replica->addresses[i].owner,
|
replica->addresses[i].owner,
|
||||||
merge->expire_time,
|
merge->expire_time,
|
||||||
False);
|
false);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
len = winsdb_addr_list_length(rec->addresses);
|
len = winsdb_addr_list_length(rec->addresses);
|
||||||
|
|
||||||
for (i=0; i < len; i++) {
|
for (i=0; i < len; i++) {
|
||||||
BOOL found = False;
|
bool found = false;
|
||||||
for (j=0; j < replica->num_addresses; j++) {
|
for (j=0; j < replica->num_addresses; j++) {
|
||||||
if (strcmp(replica->addresses[j].address, rec->addresses[i]->address) == 0) {
|
if (strcmp(replica->addresses[j].address, rec->addresses[i]->address) == 0) {
|
||||||
found = True;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -863,7 +863,7 @@ static NTSTATUS r_do_mhomed_merge(struct wreplsrv_partner *partner,
|
|||||||
rec->addresses[i]->address,
|
rec->addresses[i]->address,
|
||||||
rec->addresses[i]->wins_owner,
|
rec->addresses[i]->wins_owner,
|
||||||
rec->addresses[i]->expire_time,
|
rec->addresses[i]->expire_time,
|
||||||
False);
|
false);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -955,9 +955,9 @@ static void r_do_challenge_handler(struct irpc_request *ireq)
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct r_do_challenge_state *state = talloc_get_type(ireq->async.private,
|
struct r_do_challenge_state *state = talloc_get_type(ireq->async.private,
|
||||||
struct r_do_challenge_state);
|
struct r_do_challenge_state);
|
||||||
BOOL old_is_subset = False;
|
bool old_is_subset = false;
|
||||||
BOOL new_is_subset = False;
|
bool new_is_subset = false;
|
||||||
BOOL found = False;
|
bool found = false;
|
||||||
uint32_t i,j;
|
uint32_t i,j;
|
||||||
uint32_t num_rec_addrs;
|
uint32_t num_rec_addrs;
|
||||||
|
|
||||||
@ -974,17 +974,17 @@ static void r_do_challenge_handler(struct irpc_request *ireq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i < state->replica.num_addresses; i++) {
|
for (i=0; i < state->replica.num_addresses; i++) {
|
||||||
found = False;
|
found = false;
|
||||||
new_is_subset = True;
|
new_is_subset = true;
|
||||||
for (j=0; j < state->r.out.num_addrs; j++) {
|
for (j=0; j < state->r.out.num_addrs; j++) {
|
||||||
if (strcmp(state->replica.addresses[i].address, state->r.out.addrs[j].addr) == 0) {
|
if (strcmp(state->replica.addresses[i].address, state->r.out.addrs[j].addr) == 0) {
|
||||||
found = True;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found) continue;
|
if (found) continue;
|
||||||
|
|
||||||
new_is_subset = False;
|
new_is_subset = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,17 +996,17 @@ static void r_do_challenge_handler(struct irpc_request *ireq)
|
|||||||
|
|
||||||
num_rec_addrs = winsdb_addr_list_length(state->rec->addresses);
|
num_rec_addrs = winsdb_addr_list_length(state->rec->addresses);
|
||||||
for (i=0; i < num_rec_addrs; i++) {
|
for (i=0; i < num_rec_addrs; i++) {
|
||||||
found = False;
|
found = false;
|
||||||
old_is_subset = True;
|
old_is_subset = true;
|
||||||
for (j=0; j < state->r.out.num_addrs; j++) {
|
for (j=0; j < state->r.out.num_addrs; j++) {
|
||||||
if (strcmp(state->rec->addresses[i]->address, state->r.out.addrs[j].addr) == 0) {
|
if (strcmp(state->rec->addresses[i]->address, state->r.out.addrs[j].addr) == 0) {
|
||||||
found = True;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found) continue;
|
if (found) continue;
|
||||||
|
|
||||||
old_is_subset = False;
|
old_is_subset = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1189,8 +1189,8 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
|
|||||||
uint32_t i,j;
|
uint32_t i,j;
|
||||||
uint8_t ret;
|
uint8_t ret;
|
||||||
size_t len;
|
size_t len;
|
||||||
BOOL changed_old_addrs = False;
|
bool changed_old_addrs = false;
|
||||||
BOOL become_owner = True;
|
bool become_owner = true;
|
||||||
|
|
||||||
merge = talloc(mem_ctx, struct winsdb_record);
|
merge = talloc(mem_ctx, struct winsdb_record);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(merge);
|
NT_STATUS_HAVE_NO_MEMORY(merge);
|
||||||
@ -1210,17 +1210,17 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
|
|||||||
len = winsdb_addr_list_length(rec->addresses);
|
len = winsdb_addr_list_length(rec->addresses);
|
||||||
|
|
||||||
for (i=0; i < len; i++) {
|
for (i=0; i < len; i++) {
|
||||||
BOOL found = False;
|
bool found = false;
|
||||||
|
|
||||||
for (j=0; j < replica->num_addresses; j++) {
|
for (j=0; j < replica->num_addresses; j++) {
|
||||||
if (strcmp(rec->addresses[i]->address, replica->addresses[j].address) != 0) {
|
if (strcmp(rec->addresses[i]->address, replica->addresses[j].address) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
found = True;
|
found = true;
|
||||||
|
|
||||||
if (strcmp(rec->addresses[i]->wins_owner, replica->addresses[j].owner) != 0) {
|
if (strcmp(rec->addresses[i]->wins_owner, replica->addresses[j].owner) != 0) {
|
||||||
changed_old_addrs = True;
|
changed_old_addrs = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1231,7 +1231,7 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
|
|||||||
* it won't be added to the merged record
|
* it won't be added to the merged record
|
||||||
*/
|
*/
|
||||||
if (!found && strcmp(rec->addresses[i]->wins_owner, owner->address) == 0) {
|
if (!found && strcmp(rec->addresses[i]->wins_owner, owner->address) == 0) {
|
||||||
changed_old_addrs = True;
|
changed_old_addrs = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1245,7 +1245,7 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
|
|||||||
rec->addresses[i]->address,
|
rec->addresses[i]->address,
|
||||||
rec->addresses[i]->wins_owner,
|
rec->addresses[i]->wins_owner,
|
||||||
rec->addresses[i]->expire_time,
|
rec->addresses[i]->expire_time,
|
||||||
False);
|
false);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1255,18 +1255,18 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
|
|||||||
replica->addresses[i].address,
|
replica->addresses[i].address,
|
||||||
replica->addresses[i].owner,
|
replica->addresses[i].owner,
|
||||||
merge->expire_time,
|
merge->expire_time,
|
||||||
False);
|
false);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we the old addresses change changed we don't become the owner */
|
/* we the old addresses change changed we don't become the owner */
|
||||||
if (changed_old_addrs) {
|
if (changed_old_addrs) {
|
||||||
become_owner = False;
|
become_owner = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we're the owner of the old record, we'll be the owner of the new one too */
|
/* if we're the owner of the old record, we'll be the owner of the new one too */
|
||||||
if (strcmp(rec->wins_owner, partner->service->wins_db->local_owner)==0) {
|
if (strcmp(rec->wins_owner, partner->service->wins_db->local_owner)==0) {
|
||||||
become_owner = True;
|
become_owner = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1274,7 +1274,7 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
|
|||||||
*/
|
*/
|
||||||
len = winsdb_addr_list_length(merge->addresses);
|
len = winsdb_addr_list_length(merge->addresses);
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
become_owner = True;
|
become_owner = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1306,9 +1306,9 @@ static NTSTATUS wreplsrv_apply_one_record(struct wreplsrv_partner *partner,
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct winsdb_record *rec = NULL;
|
struct winsdb_record *rec = NULL;
|
||||||
enum _R_ACTION action = R_INVALID;
|
enum _R_ACTION action = R_INVALID;
|
||||||
BOOL same_owner = False;
|
bool same_owner = false;
|
||||||
BOOL replica_vs_replica = False;
|
bool replica_vs_replica = false;
|
||||||
BOOL local_vs_replica = False;
|
bool local_vs_replica = false;
|
||||||
|
|
||||||
status = winsdb_lookup(partner->service->wins_db,
|
status = winsdb_lookup(partner->service->wins_db,
|
||||||
&replica->name, mem_ctx, &rec);
|
&replica->name, mem_ctx, &rec);
|
||||||
@ -1318,11 +1318,11 @@ static NTSTATUS wreplsrv_apply_one_record(struct wreplsrv_partner *partner,
|
|||||||
NT_STATUS_NOT_OK_RETURN(status);
|
NT_STATUS_NOT_OK_RETURN(status);
|
||||||
|
|
||||||
if (strcmp(rec->wins_owner, partner->service->wins_db->local_owner)==0) {
|
if (strcmp(rec->wins_owner, partner->service->wins_db->local_owner)==0) {
|
||||||
local_vs_replica = True;
|
local_vs_replica = true;
|
||||||
} else if (strcmp(rec->wins_owner, owner->address)==0) {
|
} else if (strcmp(rec->wins_owner, owner->address)==0) {
|
||||||
same_owner = True;
|
same_owner = true;
|
||||||
} else {
|
} else {
|
||||||
replica_vs_replica = True;
|
replica_vs_replica = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rec->is_static && !same_owner) {
|
if (rec->is_static && !same_owner) {
|
||||||
|
@ -61,7 +61,7 @@ static NTSTATUS wreplsrv_in_start_association(struct wreplsrv_in_call *call)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
call->wreplconn->assoc_ctx.stopped = False;
|
call->wreplconn->assoc_ctx.stopped = false;
|
||||||
call->wreplconn->assoc_ctx.our_ctx = WREPLSRV_VALID_ASSOC_CTX;
|
call->wreplconn->assoc_ctx.our_ctx = WREPLSRV_VALID_ASSOC_CTX;
|
||||||
call->wreplconn->assoc_ctx.peer_ctx = start->assoc_ctx;
|
call->wreplconn->assoc_ctx.peer_ctx = start->assoc_ctx;
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ static NTSTATUS wreplsrv_in_stop_assoc_ctx(struct wreplsrv_in_call *call)
|
|||||||
{
|
{
|
||||||
struct wrepl_stop *stop_out = &call->rep_packet.message.stop;
|
struct wrepl_stop *stop_out = &call->rep_packet.message.stop;
|
||||||
|
|
||||||
call->wreplconn->assoc_ctx.stopped = True;
|
call->wreplconn->assoc_ctx.stopped = true;
|
||||||
|
|
||||||
call->rep_packet.mess_type = WREPL_STOP_ASSOCIATION;
|
call->rep_packet.mess_type = WREPL_STOP_ASSOCIATION;
|
||||||
stop_out->reason = 4;
|
stop_out->reason = 4;
|
||||||
@ -120,7 +120,7 @@ static NTSTATUS wreplsrv_in_stop_association(struct wreplsrv_in_call *call)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* this will cause to not receive packets anymore and terminate the connection if the reply is send */
|
/* this will cause to not receive packets anymore and terminate the connection if the reply is send */
|
||||||
call->terminate_after_send = True;
|
call->terminate_after_send = true;
|
||||||
return wreplsrv_in_stop_assoc_ctx(call);
|
return wreplsrv_in_stop_assoc_ctx(call);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ static NTSTATUS wreplsrv_in_table_query(struct wreplsrv_in_call *call)
|
|||||||
repl_out->command = WREPL_REPL_TABLE_REPLY;
|
repl_out->command = WREPL_REPL_TABLE_REPLY;
|
||||||
|
|
||||||
return wreplsrv_fill_wrepl_table(service, call, table_out,
|
return wreplsrv_fill_wrepl_table(service, call, table_out,
|
||||||
service->wins_db->local_owner, True);
|
service->wins_db->local_owner, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wreplsrv_in_sort_wins_name(struct wrepl_wins_name *n1,
|
static int wreplsrv_in_sort_wins_name(struct wrepl_wins_name *n1,
|
||||||
|
@ -138,7 +138,7 @@ static struct composite_context *wreplsrv_out_connect_send(struct wreplsrv_partn
|
|||||||
struct wreplsrv_service *service = partner->service;
|
struct wreplsrv_service *service = partner->service;
|
||||||
struct wreplsrv_out_connect_state *state = NULL;
|
struct wreplsrv_out_connect_state *state = NULL;
|
||||||
struct wreplsrv_out_connection **wreplconnp = &wreplconn;
|
struct wreplsrv_out_connection **wreplconnp = &wreplconn;
|
||||||
BOOL cached_connection = False;
|
bool cached_connection = false;
|
||||||
|
|
||||||
c = talloc_zero(partner, struct composite_context);
|
c = talloc_zero(partner, struct composite_context);
|
||||||
if (!c) goto failed;
|
if (!c) goto failed;
|
||||||
@ -153,11 +153,11 @@ static struct composite_context *wreplsrv_out_connect_send(struct wreplsrv_partn
|
|||||||
c->private_data = state;
|
c->private_data = state;
|
||||||
|
|
||||||
if (type == WINSREPL_PARTNER_PUSH) {
|
if (type == WINSREPL_PARTNER_PUSH) {
|
||||||
cached_connection = True;
|
cached_connection = true;
|
||||||
wreplconn = partner->push.wreplconn;
|
wreplconn = partner->push.wreplconn;
|
||||||
wreplconnp = &partner->push.wreplconn;
|
wreplconnp = &partner->push.wreplconn;
|
||||||
} else if (type == WINSREPL_PARTNER_PULL) {
|
} else if (type == WINSREPL_PARTNER_PULL) {
|
||||||
cached_connection = True;
|
cached_connection = true;
|
||||||
wreplconn = partner->pull.wreplconn;
|
wreplconn = partner->pull.wreplconn;
|
||||||
wreplconnp = &partner->pull.wreplconn;
|
wreplconnp = &partner->pull.wreplconn;
|
||||||
}
|
}
|
||||||
@ -572,7 +572,7 @@ static NTSTATUS wreplsrv_pull_cycle_next_owner_do_work(struct wreplsrv_pull_cycl
|
|||||||
struct wreplsrv_owner *local_owner;
|
struct wreplsrv_owner *local_owner;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
uint64_t old_max_version = 0;
|
uint64_t old_max_version = 0;
|
||||||
BOOL do_pull = False;
|
bool do_pull = false;
|
||||||
|
|
||||||
for (i=state->current; i < state->table_io.out.num_owners; i++) {
|
for (i=state->current; i < state->table_io.out.num_owners; i++) {
|
||||||
current_owner = wreplsrv_find_owner(state->io->in.partner->service,
|
current_owner = wreplsrv_find_owner(state->io->in.partner->service,
|
||||||
@ -593,7 +593,7 @@ static NTSTATUS wreplsrv_pull_cycle_next_owner_do_work(struct wreplsrv_pull_cycl
|
|||||||
* so fetch them
|
* so fetch them
|
||||||
*/
|
*/
|
||||||
if (!local_owner) {
|
if (!local_owner) {
|
||||||
do_pull = True;
|
do_pull = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -603,7 +603,7 @@ static NTSTATUS wreplsrv_pull_cycle_next_owner_do_work(struct wreplsrv_pull_cycl
|
|||||||
* fetch them
|
* fetch them
|
||||||
*/
|
*/
|
||||||
if (current_owner->owner.max_version > local_owner->owner.max_version) {
|
if (current_owner->owner.max_version > local_owner->owner.max_version) {
|
||||||
do_pull = True;
|
do_pull = true;
|
||||||
old_max_version = local_owner->owner.max_version;
|
old_max_version = local_owner->owner.max_version;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -829,7 +829,7 @@ struct wreplsrv_push_notify_state {
|
|||||||
struct composite_context *c;
|
struct composite_context *c;
|
||||||
struct wreplsrv_push_notify_io *io;
|
struct wreplsrv_push_notify_io *io;
|
||||||
enum wrepl_replication_cmd command;
|
enum wrepl_replication_cmd command;
|
||||||
BOOL full_table;
|
bool full_table;
|
||||||
struct wrepl_send_ctrl ctrl;
|
struct wrepl_send_ctrl ctrl;
|
||||||
struct wrepl_request *req;
|
struct wrepl_request *req;
|
||||||
struct wrepl_packet req_packet;
|
struct wrepl_packet req_packet;
|
||||||
@ -946,7 +946,7 @@ static NTSTATUS wreplsrv_push_notify_inform(struct wreplsrv_push_notify_state *s
|
|||||||
NT_STATUS_NOT_OK_RETURN(status);
|
NT_STATUS_NOT_OK_RETURN(status);
|
||||||
|
|
||||||
/* we won't get a reply to a inform message */
|
/* we won't get a reply to a inform message */
|
||||||
state->ctrl.send_only = True;
|
state->ctrl.send_only = true;
|
||||||
|
|
||||||
state->req = wrepl_request_send(state->wreplconn->sock, req, &state->ctrl);
|
state->req = wrepl_request_send(state->wreplconn->sock, req, &state->ctrl);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(state->req);
|
NT_STATUS_HAVE_NO_MEMORY(state->req);
|
||||||
@ -968,16 +968,16 @@ static NTSTATUS wreplsrv_push_notify_wait_connect(struct wreplsrv_push_notify_st
|
|||||||
|
|
||||||
switch (state->command) {
|
switch (state->command) {
|
||||||
case WREPL_REPL_UPDATE:
|
case WREPL_REPL_UPDATE:
|
||||||
state->full_table = True;
|
state->full_table = true;
|
||||||
return wreplsrv_push_notify_update(state);
|
return wreplsrv_push_notify_update(state);
|
||||||
case WREPL_REPL_UPDATE2:
|
case WREPL_REPL_UPDATE2:
|
||||||
state->full_table = False;
|
state->full_table = false;
|
||||||
return wreplsrv_push_notify_update(state);
|
return wreplsrv_push_notify_update(state);
|
||||||
case WREPL_REPL_INFORM:
|
case WREPL_REPL_INFORM:
|
||||||
state->full_table = True;
|
state->full_table = true;
|
||||||
return wreplsrv_push_notify_inform(state);
|
return wreplsrv_push_notify_inform(state);
|
||||||
case WREPL_REPL_INFORM2:
|
case WREPL_REPL_INFORM2:
|
||||||
state->full_table = False;
|
state->full_table = false;
|
||||||
return wreplsrv_push_notify_inform(state);
|
return wreplsrv_push_notify_inform(state);
|
||||||
default:
|
default:
|
||||||
return NT_STATUS_INTERNAL_ERROR;
|
return NT_STATUS_INTERNAL_ERROR;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "libcli/composite/composite.h"
|
#include "libcli/composite/composite.h"
|
||||||
#include "nbt_server/wins/winsdb.h"
|
#include "nbt_server/wins/winsdb.h"
|
||||||
|
|
||||||
static void wreplsrv_out_partner_push(struct wreplsrv_partner *partner, BOOL propagate);
|
static void wreplsrv_out_partner_push(struct wreplsrv_partner *partner, bool propagate);
|
||||||
|
|
||||||
static void wreplsrv_push_handler_creq(struct composite_context *creq)
|
static void wreplsrv_push_handler_creq(struct composite_context *creq)
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ done:
|
|||||||
talloc_free(old_notify_io);
|
talloc_free(old_notify_io);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wreplsrv_out_partner_push(struct wreplsrv_partner *partner, BOOL propagate)
|
static void wreplsrv_out_partner_push(struct wreplsrv_partner *partner, bool propagate)
|
||||||
{
|
{
|
||||||
/* a push for this partner is currently in progress, so we're done */
|
/* a push for this partner is currently in progress, so we're done */
|
||||||
if (partner->push.creq) return;
|
if (partner->push.creq) return;
|
||||||
@ -137,7 +137,7 @@ NTSTATUS wreplsrv_out_push_run(struct wreplsrv_service *service)
|
|||||||
/* if the configured change count isn't reached, go to the next partner */
|
/* if the configured change count isn't reached, go to the next partner */
|
||||||
if (change_count < partner->push.change_count) continue;
|
if (change_count < partner->push.change_count) continue;
|
||||||
|
|
||||||
wreplsrv_out_partner_push(partner, False);
|
wreplsrv_out_partner_push(partner, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
|
@ -59,9 +59,9 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
|
|||||||
const char *old_state=NULL;
|
const char *old_state=NULL;
|
||||||
const char *new_state=NULL;
|
const char *new_state=NULL;
|
||||||
uint32_t modify_flags;
|
uint32_t modify_flags;
|
||||||
BOOL modify_record;
|
bool modify_record;
|
||||||
BOOL delete_record;
|
bool delete_record;
|
||||||
BOOL delete_tombstones;
|
bool delete_tombstones;
|
||||||
struct timeval tombstone_extra_time;
|
struct timeval tombstone_extra_time;
|
||||||
|
|
||||||
now_timestr = ldb_timestring(tmp_mem, now);
|
now_timestr = ldb_timestring(tmp_mem, now);
|
||||||
@ -94,8 +94,8 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
|
|||||||
talloc_free(res->msgs[i]);
|
talloc_free(res->msgs[i]);
|
||||||
|
|
||||||
modify_flags = 0;
|
modify_flags = 0;
|
||||||
modify_record = False;
|
modify_record = false;
|
||||||
delete_record = False;
|
delete_record = false;
|
||||||
|
|
||||||
switch (rec->state) {
|
switch (rec->state) {
|
||||||
case WREPL_STATE_ACTIVE:
|
case WREPL_STATE_ACTIVE:
|
||||||
@ -107,7 +107,7 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
|
|||||||
rec->expire_time= service->config.tombstone_interval + now;
|
rec->expire_time= service->config.tombstone_interval + now;
|
||||||
}
|
}
|
||||||
modify_flags = 0;
|
modify_flags = 0;
|
||||||
modify_record = True;
|
modify_record = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WREPL_STATE_RELEASED:
|
case WREPL_STATE_RELEASED:
|
||||||
@ -116,7 +116,7 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
|
|||||||
rec->state = WREPL_STATE_TOMBSTONE;
|
rec->state = WREPL_STATE_TOMBSTONE;
|
||||||
rec->expire_time= service->config.tombstone_timeout + now;
|
rec->expire_time= service->config.tombstone_timeout + now;
|
||||||
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
|
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
|
||||||
modify_record = True;
|
modify_record = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WREPL_STATE_TOMBSTONE:
|
case WREPL_STATE_TOMBSTONE:
|
||||||
@ -124,7 +124,7 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
|
|||||||
new_state = "tombstone";
|
new_state = "tombstone";
|
||||||
if (!delete_tombstones) break;
|
if (!delete_tombstones) break;
|
||||||
new_state = "deleted";
|
new_state = "deleted";
|
||||||
delete_record = True;
|
delete_record = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WREPL_STATE_RESERVED:
|
case WREPL_STATE_RESERVED:
|
||||||
@ -173,9 +173,9 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
|
|||||||
const char *old_state=NULL;
|
const char *old_state=NULL;
|
||||||
const char *new_state=NULL;
|
const char *new_state=NULL;
|
||||||
uint32_t modify_flags;
|
uint32_t modify_flags;
|
||||||
BOOL modify_record;
|
bool modify_record;
|
||||||
BOOL delete_record;
|
bool delete_record;
|
||||||
BOOL delete_tombstones;
|
bool delete_tombstones;
|
||||||
struct timeval tombstone_extra_time;
|
struct timeval tombstone_extra_time;
|
||||||
|
|
||||||
now_timestr = ldb_timestring(tmp_mem, now);
|
now_timestr = ldb_timestring(tmp_mem, now);
|
||||||
@ -208,8 +208,8 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
|
|||||||
talloc_free(res->msgs[i]);
|
talloc_free(res->msgs[i]);
|
||||||
|
|
||||||
modify_flags = 0;
|
modify_flags = 0;
|
||||||
modify_record = False;
|
modify_record = false;
|
||||||
delete_record = False;
|
delete_record = false;
|
||||||
|
|
||||||
switch (rec->state) {
|
switch (rec->state) {
|
||||||
case WREPL_STATE_ACTIVE:
|
case WREPL_STATE_ACTIVE:
|
||||||
@ -223,7 +223,7 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
|
|||||||
rec->state = WREPL_STATE_TOMBSTONE;
|
rec->state = WREPL_STATE_TOMBSTONE;
|
||||||
rec->expire_time= service->config.tombstone_timeout + now;
|
rec->expire_time= service->config.tombstone_timeout + now;
|
||||||
modify_flags = 0;
|
modify_flags = 0;
|
||||||
modify_record = True;
|
modify_record = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WREPL_STATE_TOMBSTONE:
|
case WREPL_STATE_TOMBSTONE:
|
||||||
@ -231,7 +231,7 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
|
|||||||
new_state = "tombstone";
|
new_state = "tombstone";
|
||||||
if (!delete_tombstones) break;
|
if (!delete_tombstones) break;
|
||||||
new_state = "deleted";
|
new_state = "deleted";
|
||||||
delete_record = True;
|
delete_record = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WREPL_STATE_RESERVED:
|
case WREPL_STATE_RESERVED:
|
||||||
@ -282,9 +282,9 @@ static void verify_handler(struct irpc_request *ireq)
|
|||||||
const char *new_state = "active";
|
const char *new_state = "active";
|
||||||
const char *new_owner = "replica";
|
const char *new_owner = "replica";
|
||||||
uint32_t modify_flags = 0;
|
uint32_t modify_flags = 0;
|
||||||
BOOL modify_record = False;
|
bool modify_record = false;
|
||||||
BOOL delete_record = False;
|
bool delete_record = false;
|
||||||
BOOL different = False;
|
bool different = false;
|
||||||
int ret;
|
int ret;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
uint32_t i, j;
|
uint32_t i, j;
|
||||||
@ -298,25 +298,25 @@ static void verify_handler(struct irpc_request *ireq)
|
|||||||
*/
|
*/
|
||||||
status = irpc_call_recv(ireq);
|
status = irpc_call_recv(ireq);
|
||||||
if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
|
if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
|
||||||
delete_record = True;
|
delete_record = true;
|
||||||
new_state = "deleted";
|
new_state = "deleted";
|
||||||
} else if (NT_STATUS_IS_OK(status) && rec->type != WREPL_TYPE_GROUP) {
|
} else if (NT_STATUS_IS_OK(status) && rec->type != WREPL_TYPE_GROUP) {
|
||||||
for (i=0; i < s->r.out.num_addrs; i++) {
|
for (i=0; i < s->r.out.num_addrs; i++) {
|
||||||
BOOL found = False;
|
bool found = false;
|
||||||
for (j=0; rec->addresses[j]; j++) {
|
for (j=0; rec->addresses[j]; j++) {
|
||||||
if (strcmp(s->r.out.addrs[i].addr, rec->addresses[j]->address) == 0) {
|
if (strcmp(s->r.out.addrs[i].addr, rec->addresses[j]->address) == 0) {
|
||||||
found = True;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
different = True;
|
different = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (NT_STATUS_IS_OK(status) && rec->type == WREPL_TYPE_GROUP) {
|
} else if (NT_STATUS_IS_OK(status) && rec->type == WREPL_TYPE_GROUP) {
|
||||||
if (s->r.out.num_addrs != 1 || strcmp(s->r.out.addrs[0].addr, "255.255.255.255") != 0) {
|
if (s->r.out.num_addrs != 1 || strcmp(s->r.out.addrs[0].addr, "255.255.255.255") != 0) {
|
||||||
different = True;
|
different = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ static void verify_handler(struct irpc_request *ireq)
|
|||||||
for (i=0; rec->addresses[i]; i++) {
|
for (i=0; rec->addresses[i]; i++) {
|
||||||
rec->addresses[i]->expire_time = rec->expire_time;
|
rec->addresses[i]->expire_time = rec->expire_time;
|
||||||
}
|
}
|
||||||
modify_record = True;
|
modify_record = true;
|
||||||
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
|
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
|
||||||
new_state = "tombstone";
|
new_state = "tombstone";
|
||||||
new_owner = "owned";
|
new_owner = "owned";
|
||||||
@ -346,7 +346,7 @@ static void verify_handler(struct irpc_request *ireq)
|
|||||||
for (i=0; rec->addresses[i]; i++) {
|
for (i=0; rec->addresses[i]; i++) {
|
||||||
rec->addresses[i]->expire_time = rec->expire_time;
|
rec->addresses[i]->expire_time = rec->expire_time;
|
||||||
}
|
}
|
||||||
modify_record = True;
|
modify_record = true;
|
||||||
modify_flags = 0;
|
modify_flags = 0;
|
||||||
new_state = "active";
|
new_state = "active";
|
||||||
}
|
}
|
||||||
@ -468,14 +468,14 @@ NTSTATUS wreplsrv_scavenging_run(struct wreplsrv_service *service)
|
|||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
TALLOC_CTX *tmp_mem;
|
TALLOC_CTX *tmp_mem;
|
||||||
BOOL skip_first_run = False;
|
bool skip_first_run = false;
|
||||||
|
|
||||||
if (!timeval_expired(&service->scavenging.next_run)) {
|
if (!timeval_expired(&service->scavenging.next_run)) {
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeval_is_zero(&service->scavenging.next_run)) {
|
if (timeval_is_zero(&service->scavenging.next_run)) {
|
||||||
skip_first_run = True;
|
skip_first_run = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
service->scavenging.next_run = timeval_current_ofs(service->config.scavenging_interval, 0);
|
service->scavenging.next_run = timeval_current_ofs(service->config.scavenging_interval, 0);
|
||||||
@ -498,25 +498,25 @@ NTSTATUS wreplsrv_scavenging_run(struct wreplsrv_service *service)
|
|||||||
|
|
||||||
tmp_mem = talloc_new(service);
|
tmp_mem = talloc_new(service);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
|
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
|
||||||
service->scavenging.processing = True;
|
service->scavenging.processing = true;
|
||||||
status = wreplsrv_scavenging_owned_records(service,tmp_mem);
|
status = wreplsrv_scavenging_owned_records(service,tmp_mem);
|
||||||
service->scavenging.processing = False;
|
service->scavenging.processing = false;
|
||||||
talloc_free(tmp_mem);
|
talloc_free(tmp_mem);
|
||||||
NT_STATUS_NOT_OK_RETURN(status);
|
NT_STATUS_NOT_OK_RETURN(status);
|
||||||
|
|
||||||
tmp_mem = talloc_new(service);
|
tmp_mem = talloc_new(service);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
|
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
|
||||||
service->scavenging.processing = True;
|
service->scavenging.processing = true;
|
||||||
status = wreplsrv_scavenging_replica_non_active_records(service, tmp_mem);
|
status = wreplsrv_scavenging_replica_non_active_records(service, tmp_mem);
|
||||||
service->scavenging.processing = False;
|
service->scavenging.processing = false;
|
||||||
talloc_free(tmp_mem);
|
talloc_free(tmp_mem);
|
||||||
NT_STATUS_NOT_OK_RETURN(status);
|
NT_STATUS_NOT_OK_RETURN(status);
|
||||||
|
|
||||||
tmp_mem = talloc_new(service);
|
tmp_mem = talloc_new(service);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
|
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
|
||||||
service->scavenging.processing = True;
|
service->scavenging.processing = true;
|
||||||
status = wreplsrv_scavenging_replica_active_records(service, tmp_mem);
|
status = wreplsrv_scavenging_replica_active_records(service, tmp_mem);
|
||||||
service->scavenging.processing = False;
|
service->scavenging.processing = false;
|
||||||
talloc_free(tmp_mem);
|
talloc_free(tmp_mem);
|
||||||
NT_STATUS_NOT_OK_RETURN(status);
|
NT_STATUS_NOT_OK_RETURN(status);
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ NTSTATUS wreplsrv_load_partners(struct wreplsrv_service *service)
|
|||||||
WINSREPL_DEFAULT_PULL_RETRY_INTERVAL);
|
WINSREPL_DEFAULT_PULL_RETRY_INTERVAL);
|
||||||
partner->push.change_count = ldb_msg_find_attr_as_uint(res->msgs[i], "pushChangeCount",
|
partner->push.change_count = ldb_msg_find_attr_as_uint(res->msgs[i], "pushChangeCount",
|
||||||
WINSREPL_DEFAULT_PUSH_CHANGE_COUNT);
|
WINSREPL_DEFAULT_PUSH_CHANGE_COUNT);
|
||||||
partner->push.use_inform = ldb_msg_find_attr_as_uint(res->msgs[i], "pushUseInform", False);
|
partner->push.use_inform = ldb_msg_find_attr_as_uint(res->msgs[i], "pushUseInform", false);
|
||||||
|
|
||||||
DEBUG(3,("wreplsrv_load_partners: found partner: %s type: 0x%X\n",
|
DEBUG(3,("wreplsrv_load_partners: found partner: %s type: 0x%X\n",
|
||||||
partner->address, partner->type));
|
partner->address, partner->type));
|
||||||
@ -218,7 +218,7 @@ NTSTATUS wreplsrv_fill_wrepl_table(struct wreplsrv_service *service,
|
|||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
struct wrepl_table *table_out,
|
struct wrepl_table *table_out,
|
||||||
const char *initiator,
|
const char *initiator,
|
||||||
BOOL full_table)
|
bool full_table)
|
||||||
{
|
{
|
||||||
struct wreplsrv_owner *cur;
|
struct wreplsrv_owner *cur;
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user