char *name;
char *event_service_prefix;
pthread_mutex_t lock;
- _Bool batch_mode;
- _Bool notifications;
- _Bool check_thresholds;
- _Bool store_rates;
- _Bool always_append_ds;
+ bool batch_mode;
+ bool notifications;
+ bool check_thresholds;
+ bool store_rates;
+ bool always_append_ds;
char *node;
int port;
riemann_client_type_t client_type;
{
char ds_index[DATA_MAX_NAME_LEN];
- snprintf(ds_index, sizeof(ds_index), "%zu", index);
+ snprintf(ds_index, sizeof(ds_index), "%" PRIsz, index);
riemann_event_string_attribute_add(event, "ds_index", ds_index);
}
wrr_disconnect(host);
+ pthread_mutex_lock(&host->lock);
pthread_mutex_destroy(&host->lock);
sfree(host);
} /* }}} void wrr_free */
host->reference_count = 1;
host->node = NULL;
host->port = 0;
- host->notifications = 1;
- host->check_thresholds = 0;
- host->store_rates = 1;
- host->always_append_ds = 0;
- host->batch_mode = 1;
+ host->notifications = true;
+ host->check_thresholds = false;
+ host->store_rates = true;
+ host->always_append_ds = false;
+ host->batch_mode = true;
host->batch_max = RIEMANN_BATCH_MAX; /* typical MSS */
host->batch_init = cdtime();
host->batch_timeout = 0;