if (data.dsize < sizeof(uint32_t) ||
d->length != data.dsize) {
DEBUG(DEBUG_ERR,("Bad data size %u in traverse_handler\n", (unsigned)data.dsize));
- state->done = True;
+ state->done = true;
return;
}
if (key.dsize == 0 && data.dsize == 0) {
/* end of traverse */
- state->done = True;
+ state->done = true;
return;
}
}
if (state->fn(ctdb, key, data, state->private_data) != 0) {
- state->done = True;
+ state->done = true;
}
state->count++;
uint64_t srvid = (getpid() | 0xFLL<<60);
struct traverse_state state;
- state.done = False;
+ state.done = false;
state.count = 0;
state.private_data = private_data;
state.fn = fn;
}
static void
-delete_node(trbt_node_t *node, BOOL from_destructor)
+delete_node(trbt_node_t *node, bool from_destructor)
{
trbt_node_t *parent, *child, dc;
trbt_node_t *temp = NULL;
*/
static int node_destructor(trbt_node_t *node)
{
- delete_node(node, True);
+ delete_node(node, true);
return 0;
}
while(node){
if(key==node->key32){
- delete_node(node, False);
+ delete_node(node, false);
return;
}
if(key<node->key32){
#include "tevent.h"
-typedef bool BOOL;
-
-#define True 1
-#define False 0
-
extern int LogLevel;
extern int this_log_level;
char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
_PUBLIC_ const char **str_list_add(const char **list, const char *s);
-_PUBLIC_ int set_blocking(int fd, BOOL set);
+_PUBLIC_ int set_blocking(int fd, bool set);
#include "lib/util/debug.h"
#include "lib/util/util.h"
if BSD use FNDELAY
**/
-_PUBLIC_ int set_blocking(int fd, BOOL set)
+_PUBLIC_ int set_blocking(int fd, bool set)
{
int val;
#ifdef O_NONBLOCK
/* fetch the current record */
ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, &header, hdr, &data2,
- ctdb_call_input_pkt, ctdb, False);
+ ctdb_call_input_pkt, ctdb, false);
if (ret == -1) {
ctdb_fatal(ctdb, "ctdb_req_dmaster failed to fetch record");
return;
if the call will be answered locally */
ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, call->key, &header, hdr, &data,
- ctdb_call_input_pkt, ctdb, False);
+ ctdb_call_input_pkt, ctdb, false);
if (ret == -1) {
ctdb_send_error(ctdb, hdr, ret, "ltdb fetch failed in ctdb_request_call");
return;
key.dsize = state->c->keylen;
key.dptr = state->c->data;
ret = ctdb_ltdb_lock_requeue(ctdb_db, key, hdr,
- ctdb_call_input_pkt, ctdb, False);
+ ctdb_call_input_pkt, ctdb, false);
if (ret == -2) {
return;
}
}
ret = ctdb_ltdb_lock_requeue(ctdb_db, key, hdr,
- ctdb_call_input_pkt, ctdb, False);
+ ctdb_call_input_pkt, ctdb, false);
if (ret == -2) {
return;
}
struct ctdb_req_control *c = (struct ctdb_req_control *)hdr;
TDB_DATA data, *outdata;
int32_t status;
- bool async_reply = False;
+ bool async_reply = false;
const char *errormsg = NULL;
data.dptr = &c->data[0];
ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, &header,
(struct ctdb_req_header *)c, &data,
- daemon_incoming_packet_wrap, w, True);
+ daemon_incoming_packet_wrap, w, true);
if (ret == -2) {
/* will retry later */
CTDB_DECREMENT_STAT(ctdb, pending_calls);
return 0;
}
- tdb_reopen_all(False);
+ tdb_reopen_all(false);
if (do_fork) {
setsid();
DLIST_ADD(ctdb->freeze_handles[priority]->waiters, w);
/* we won't reply till later */
- *async_reply = True;
+ *async_reply = true;
return 0;
}
ctdb_reloadips_timeout_event, h);
/* we reply later */
- *async_reply = True;
+ *async_reply = true;
return 0;
}
}
/* start the protocol running (as a child) */
- return ctdb_start_daemon(ctdb, interactive?False:True, options.use_syslog, options.public_address_list);
+ return ctdb_start_daemon(ctdb, interactive?false:true, options.use_syslog, options.public_address_list);
}