summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_apply_records.c112
-rw-r--r--source4/wrepl_server/wrepl_in_call.c8
-rw-r--r--source4/wrepl_server/wrepl_out_helpers.c24
-rw-r--r--source4/wrepl_server/wrepl_out_push.c6
-rw-r--r--source4/wrepl_server/wrepl_scavenging.c66
-rw-r--r--source4/wrepl_server/wrepl_server.c4
6 files changed, 110 insertions, 110 deletions
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c
index 2779bf02a3..380b77517f 100644
--- a/source4/wrepl_server/wrepl_apply_records.c
+++ b/source4/wrepl_server/wrepl_apply_records.c
@@ -75,77 +75,77 @@ static enum _R_ACTION replace_same_owner(struct winsdb_record *r1, struct wrepl_
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;
size_t len = winsdb_addr_list_length(r1->addresses);
for (i=0; i < len; i++) {
- BOOL found = False;
+ bool found = false;
for (j=0; j < r2->num_addresses; j++) {
if (strcmp(r1->addresses[i]->address, r2->addresses[j].address) != 0) {
continue;
}
if (check_owners && strcmp(r1->addresses[i]->wins_owner, r2->addresses[j].owner) != 0) {
- return False;
+ return false;
}
- found = True;
+ found = true;
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;
size_t len = winsdb_addr_list_length(r1->addresses);
for (i=0; i < r2->num_addresses; i++) {
- BOOL found = False;
+ bool found = false;
for (j=0; j < len; j++) {
if (strcmp(r2->addresses[i].address, r1->addresses[j]->address) != 0) {
continue;
}
if (check_owners && strcmp(r2->addresses[i].owner, r1->addresses[j]->wins_owner) != 0) {
- return False;
+ return false;
}
- found = True;
+ found = true;
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);
if (len != r2->num_addresses) {
- return False;
+ return false;
}
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;
size_t len = winsdb_addr_list_length(r1->addresses);
for (i=0; i < len; i++) {
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;
}
- 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 */
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 */
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
*/
- 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
* <=>
@@ -559,7 +559,7 @@ static enum _R_ACTION replace_sgroup_owned_vs_X_replica(struct winsdb_record *r1
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
* 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
*/
- 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
* <=>
@@ -695,7 +695,7 @@ static NTSTATUS r_do_add(struct wreplsrv_partner *partner,
replica->addresses[i].address,
replica->addresses[i].owner,
rec->expire_time,
- False);
+ false);
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].owner,
rec->expire_time,
- False);
+ false);
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].owner,
merge->expire_time,
- False);
+ false);
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
}
len = winsdb_addr_list_length(rec->addresses);
for (i=0; i < len; i++) {
- BOOL found = False;
+ bool found = false;
for (j=0; j < replica->num_addresses; j++) {
if (strcmp(replica->addresses[j].address, rec->addresses[i]->address) == 0) {
- found = True;
+ found = true;
break;
}
}
@@ -863,7 +863,7 @@ static NTSTATUS r_do_mhomed_merge(struct wreplsrv_partner *partner,
rec->addresses[i]->address,
rec->addresses[i]->wins_owner,
rec->addresses[i]->expire_time,
- False);
+ false);
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
}
@@ -955,9 +955,9 @@ static void r_do_challenge_handler(struct irpc_request *ireq)
NTSTATUS status;
struct r_do_challenge_state *state = talloc_get_type(ireq->async.private,
struct r_do_challenge_state);
- BOOL old_is_subset = False;
- BOOL new_is_subset = False;
- BOOL found = False;
+ bool old_is_subset = false;
+ bool new_is_subset = false;
+ bool found = false;
uint32_t i,j;
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++) {
- found = False;
- new_is_subset = True;
+ found = false;
+ new_is_subset = true;
for (j=0; j < state->r.out.num_addrs; j++) {
if (strcmp(state->replica.addresses[i].address, state->r.out.addrs[j].addr) == 0) {
- found = True;
+ found = true;
break;
}
}
if (found) continue;
- new_is_subset = False;
+ new_is_subset = false;
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);
for (i=0; i < num_rec_addrs; i++) {
- found = False;
- old_is_subset = True;
+ found = false;
+ old_is_subset = true;
for (j=0; j < state->r.out.num_addrs; j++) {
if (strcmp(state->rec->addresses[i]->address, state->r.out.addrs[j].addr) == 0) {
- found = True;
+ found = true;
break;
}
}
if (found) continue;
- old_is_subset = False;
+ old_is_subset = false;
break;
}
@@ -1189,8 +1189,8 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
uint32_t i,j;
uint8_t ret;
size_t len;
- BOOL changed_old_addrs = False;
- BOOL become_owner = True;
+ bool changed_old_addrs = false;
+ bool become_owner = true;
merge = talloc(mem_ctx, struct winsdb_record);
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);
for (i=0; i < len; i++) {
- BOOL found = False;
+ bool found = false;
for (j=0; j < replica->num_addresses; j++) {
if (strcmp(rec->addresses[i]->address, replica->addresses[j].address) != 0) {
continue;
}
- found = True;
+ found = true;
if (strcmp(rec->addresses[i]->wins_owner, replica->addresses[j].owner) != 0) {
- changed_old_addrs = True;
+ changed_old_addrs = true;
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
*/
if (!found && strcmp(rec->addresses[i]->wins_owner, owner->address) == 0) {
- changed_old_addrs = True;
+ changed_old_addrs = true;
continue;
}
@@ -1245,7 +1245,7 @@ static NTSTATUS r_do_sgroup_merge(struct wreplsrv_partner *partner,
rec->addresses[i]->address,
rec->addresses[i]->wins_owner,
rec->addresses[i]->expire_time,
- False);
+ false);
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].owner,
merge->expire_time,
- False);
+ false);
NT_STATUS_HAVE_NO_MEMORY(merge->addresses);
}
/* we the old addresses change changed we don't become the owner */
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 (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);
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;
struct winsdb_record *rec = NULL;
enum _R_ACTION action = R_INVALID;
- BOOL same_owner = False;
- BOOL replica_vs_replica = False;
- BOOL local_vs_replica = False;
+ bool same_owner = false;
+ bool replica_vs_replica = false;
+ bool local_vs_replica = false;
status = winsdb_lookup(partner->service->wins_db,
&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);
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) {
- same_owner = True;
+ same_owner = true;
} else {
- replica_vs_replica = True;
+ replica_vs_replica = true;
}
if (rec->is_static && !same_owner) {
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index 75ac4a6e31..0508c306e0 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -61,7 +61,7 @@ static NTSTATUS wreplsrv_in_start_association(struct wreplsrv_in_call *call)
}
#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.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;
- call->wreplconn->assoc_ctx.stopped = True;
+ call->wreplconn->assoc_ctx.stopped = true;
call->rep_packet.mess_type = WREPL_STOP_ASSOCIATION;
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 */
- call->terminate_after_send = True;
+ call->terminate_after_send = true;
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;
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,
diff --git a/source4/wrepl_server/wrepl_out_helpers.c b/source4/wrepl_server/wrepl_out_helpers.c
index 9675c5abd0..2599ef4d09 100644
--- a/source4/wrepl_server/wrepl_out_helpers.c
+++ b/source4/wrepl_server/wrepl_out_helpers.c
@@ -138,7 +138,7 @@ static struct composite_context *wreplsrv_out_connect_send(struct wreplsrv_partn
struct wreplsrv_service *service = partner->service;
struct wreplsrv_out_connect_state *state = NULL;
struct wreplsrv_out_connection **wreplconnp = &wreplconn;
- BOOL cached_connection = False;
+ bool cached_connection = false;
c = talloc_zero(partner, struct composite_context);
if (!c) goto failed;
@@ -153,11 +153,11 @@ static struct composite_context *wreplsrv_out_connect_send(struct wreplsrv_partn
c->private_data = state;
if (type == WINSREPL_PARTNER_PUSH) {
- cached_connection = True;
+ cached_connection = true;
wreplconn = partner->push.wreplconn;
wreplconnp = &partner->push.wreplconn;
} else if (type == WINSREPL_PARTNER_PULL) {
- cached_connection = True;
+ cached_connection = true;
wreplconn = 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;
uint32_t i;
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++) {
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
*/
if (!local_owner) {
- do_pull = True;
+ do_pull = true;
break;
}
@@ -603,7 +603,7 @@ static NTSTATUS wreplsrv_pull_cycle_next_owner_do_work(struct wreplsrv_pull_cycl
* fetch them
*/
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;
break;
}
@@ -829,7 +829,7 @@ struct wreplsrv_push_notify_state {
struct composite_context *c;
struct wreplsrv_push_notify_io *io;
enum wrepl_replication_cmd command;
- BOOL full_table;
+ bool full_table;
struct wrepl_send_ctrl ctrl;
struct wrepl_request *req;
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);
/* 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);
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) {
case WREPL_REPL_UPDATE:
- state->full_table = True;
+ state->full_table = true;
return wreplsrv_push_notify_update(state);
case WREPL_REPL_UPDATE2:
- state->full_table = False;
+ state->full_table = false;
return wreplsrv_push_notify_update(state);
case WREPL_REPL_INFORM:
- state->full_table = True;
+ state->full_table = true;
return wreplsrv_push_notify_inform(state);
case WREPL_REPL_INFORM2:
- state->full_table = False;
+ state->full_table = false;
return wreplsrv_push_notify_inform(state);
default:
return NT_STATUS_INTERNAL_ERROR;
diff --git a/source4/wrepl_server/wrepl_out_push.c b/source4/wrepl_server/wrepl_out_push.c
index 897b515f77..8f0c409662 100644
--- a/source4/wrepl_server/wrepl_out_push.c
+++ b/source4/wrepl_server/wrepl_out_push.c
@@ -25,7 +25,7 @@
#include "libcli/composite/composite.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)
{
@@ -62,7 +62,7 @@ done:
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 */
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 (change_count < partner->push.change_count) continue;
- wreplsrv_out_partner_push(partner, False);
+ wreplsrv_out_partner_push(partner, false);
}
return NT_STATUS_OK;
diff --git a/source4/wrepl_server/wrepl_scavenging.c b/source4/wrepl_server/wrepl_scavenging.c
index 9b4ae18fe7..a5cd36797d 100644
--- a/source4/wrepl_server/wrepl_scavenging.c
+++ b/source4/wrepl_server/wrepl_scavenging.c
@@ -59,9 +59,9 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
const char *old_state=NULL;
const char *new_state=NULL;
uint32_t modify_flags;
- BOOL modify_record;
- BOOL delete_record;
- BOOL delete_tombstones;
+ bool modify_record;
+ bool delete_record;
+ bool delete_tombstones;
struct timeval tombstone_extra_time;
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]);
modify_flags = 0;
- modify_record = False;
- delete_record = False;
+ modify_record = false;
+ delete_record = false;
switch (rec->state) {
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;
}
modify_flags = 0;
- modify_record = True;
+ modify_record = true;
break;
case WREPL_STATE_RELEASED:
@@ -116,7 +116,7 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
rec->state = WREPL_STATE_TOMBSTONE;
rec->expire_time= service->config.tombstone_timeout + now;
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
- modify_record = True;
+ modify_record = true;
break;
case WREPL_STATE_TOMBSTONE:
@@ -124,7 +124,7 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
new_state = "tombstone";
if (!delete_tombstones) break;
new_state = "deleted";
- delete_record = True;
+ delete_record = true;
break;
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 *new_state=NULL;
uint32_t modify_flags;
- BOOL modify_record;
- BOOL delete_record;
- BOOL delete_tombstones;
+ bool modify_record;
+ bool delete_record;
+ bool delete_tombstones;
struct timeval tombstone_extra_time;
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]);
modify_flags = 0;
- modify_record = False;
- delete_record = False;
+ modify_record = false;
+ delete_record = false;
switch (rec->state) {
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->expire_time= service->config.tombstone_timeout + now;
modify_flags = 0;
- modify_record = True;
+ modify_record = true;
break;
case WREPL_STATE_TOMBSTONE:
@@ -231,7 +231,7 @@ static NTSTATUS wreplsrv_scavenging_replica_non_active_records(struct wreplsrv_s
new_state = "tombstone";
if (!delete_tombstones) break;
new_state = "deleted";
- delete_record = True;
+ delete_record = true;
break;
case WREPL_STATE_RESERVED:
@@ -282,9 +282,9 @@ static void verify_handler(struct irpc_request *ireq)
const char *new_state = "active";
const char *new_owner = "replica";
uint32_t modify_flags = 0;
- BOOL modify_record = False;
- BOOL delete_record = False;
- BOOL different = False;
+ bool modify_record = false;
+ bool delete_record = false;
+ bool different = false;
int ret;
NTSTATUS status;
uint32_t i, j;
@@ -298,25 +298,25 @@ static void verify_handler(struct irpc_request *ireq)
*/
status = irpc_call_recv(ireq);
if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
- delete_record = True;
+ delete_record = true;
new_state = "deleted";
} else if (NT_STATUS_IS_OK(status) && rec->type != WREPL_TYPE_GROUP) {
for (i=0; i < s->r.out.num_addrs; i++) {
- BOOL found = False;
+ bool found = false;
for (j=0; rec->addresses[j]; j++) {
if (strcmp(s->r.out.addrs[i].addr, rec->addresses[j]->address) == 0) {
- found = True;
+ found = true;
break;
}
}
if (!found) {
- different = True;
+ different = true;
break;
}
}
} 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) {
- different = True;
+ different = true;
}
}
@@ -336,7 +336,7 @@ static void verify_handler(struct irpc_request *ireq)
for (i=0; rec->addresses[i]; i++) {
rec->addresses[i]->expire_time = rec->expire_time;
}
- modify_record = True;
+ modify_record = true;
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
new_state = "tombstone";
new_owner = "owned";
@@ -346,7 +346,7 @@ static void verify_handler(struct irpc_request *ireq)
for (i=0; rec->addresses[i]; i++) {
rec->addresses[i]->expire_time = rec->expire_time;
}
- modify_record = True;
+ modify_record = true;
modify_flags = 0;
new_state = "active";
}
@@ -468,14 +468,14 @@ NTSTATUS wreplsrv_scavenging_run(struct wreplsrv_service *service)
{
NTSTATUS status;
TALLOC_CTX *tmp_mem;
- BOOL skip_first_run = False;
+ bool skip_first_run = false;
if (!timeval_expired(&service->scavenging.next_run)) {
return NT_STATUS_OK;
}
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);
@@ -498,25 +498,25 @@ NTSTATUS wreplsrv_scavenging_run(struct wreplsrv_service *service)
tmp_mem = talloc_new(service);
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
- service->scavenging.processing = True;
+ service->scavenging.processing = true;
status = wreplsrv_scavenging_owned_records(service,tmp_mem);
- service->scavenging.processing = False;
+ service->scavenging.processing = false;
talloc_free(tmp_mem);
NT_STATUS_NOT_OK_RETURN(status);
tmp_mem = talloc_new(service);
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);
- service->scavenging.processing = False;
+ service->scavenging.processing = false;
talloc_free(tmp_mem);
NT_STATUS_NOT_OK_RETURN(status);
tmp_mem = talloc_new(service);
NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
- service->scavenging.processing = True;
+ service->scavenging.processing = true;
status = wreplsrv_scavenging_replica_active_records(service, tmp_mem);
- service->scavenging.processing = False;
+ service->scavenging.processing = false;
talloc_free(tmp_mem);
NT_STATUS_NOT_OK_RETURN(status);
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index f4b48ae916..be606b2a0c 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -198,7 +198,7 @@ NTSTATUS wreplsrv_load_partners(struct wreplsrv_service *service)
WINSREPL_DEFAULT_PULL_RETRY_INTERVAL);
partner->push.change_count = ldb_msg_find_attr_as_uint(res->msgs[i], "pushChangeCount",
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",
partner->address, partner->type));
@@ -218,7 +218,7 @@ NTSTATUS wreplsrv_fill_wrepl_table(struct wreplsrv_service *service,
TALLOC_CTX *mem_ctx,
struct wrepl_table *table_out,
const char *initiator,
- BOOL full_table)
+ bool full_table)
{
struct wreplsrv_owner *cur;
uint32_t i = 0;