From 1b659b41de27e8142cfce3f0a7751a32afea50f7 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Fri, 8 Jul 2016 09:14:11 +0100 Subject: [PATCH] sys__ -> sys_tree__ --- src/loop.c | 2 +- src/mosquitto.c | 2 +- src/mosquitto_broker.h | 4 ++-- src/sys_tree.c | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/loop.c b/src/loop.c index e4634e2d..cb5725eb 100644 --- a/src/loop.c +++ b/src/loop.c @@ -129,7 +129,7 @@ int mosquitto_main_loop(struct mosquitto_db *db, mosq_sock_t *listensock, int li context__free_disused(db); #ifdef WITH_SYS_TREE if(db->config->sys_interval > 0){ - sys__update(db, db->config->sys_interval, start_time); + sys_tree__update(db, db->config->sys_interval, start_time); } #endif diff --git a/src/mosquitto.c b/src/mosquitto.c index 59e404be..a3e25e51 100644 --- a/src/mosquitto.c +++ b/src/mosquitto.c @@ -278,7 +278,7 @@ int main(int argc, char *argv[]) if(rc) return rc; #ifdef WITH_SYS_TREE - sys__init(&int_db); + sys_tree__init(&int_db); #endif listener_max = -1; diff --git a/src/mosquitto_broker.h b/src/mosquitto_broker.h index c96e3515..b02eb704 100644 --- a/src/mosquitto_broker.h +++ b/src/mosquitto_broker.h @@ -510,8 +510,8 @@ void db__msg_store_deref(struct mosquitto_db *db, struct mosquitto_msg_store **s void db__msg_store_clean(struct mosquitto_db *db); int db__message_reconnect_reset(struct mosquitto_db *db, struct mosquitto *context); void db__vacuum(void); -void sys__init(struct mosquitto_db *db); -void sys__update(struct mosquitto_db *db, int interval, time_t start_time); +void sys_tree__init(struct mosquitto_db *db); +void sys_tree__update(struct mosquitto_db *db, int interval, time_t start_time); /* ============================================================ * Subscription functions diff --git a/src/sys_tree.c b/src/sys_tree.c index 46b42b3b..c7396160 100644 --- a/src/sys_tree.c +++ b/src/sys_tree.c @@ -40,7 +40,7 @@ int g_clients_expired = 0; unsigned int g_socket_connections = 0; unsigned int g_connection_count = 0; -void sys__init(struct mosquitto_db *db) +void sys_tree__init(struct mosquitto_db *db) { char buf[64]; @@ -55,7 +55,7 @@ void sys__init(struct mosquitto_db *db) db__messages_easy_queue(db, NULL, "$SYS/broker/timestamp", 2, strlen(buf), buf, 1); } -static void sys__update_clients(struct mosquitto_db *db, char *buf) +static void sys_tree__update_clients(struct mosquitto_db *db, char *buf) { static unsigned int client_count = -1; static int clients_expired = -1; @@ -100,7 +100,7 @@ static void sys__update_clients(struct mosquitto_db *db, char *buf) } #ifdef REAL_WITH_MEMORY_TRACKING -static void sys__update_memory(struct mosquitto_db *db, char *buf) +static void sys_tree__update_memory(struct mosquitto_db *db, char *buf) { static unsigned long current_heap = -1; static unsigned long max_heap = -1; @@ -139,7 +139,7 @@ static void calc_load(struct mosquitto_db *db, char *buf, const char *topic, dou * messages are sent for the $SYS hierarchy. * 'start_time' is the result of time() that the broker was started at. */ -void sys__update(struct mosquitto_db *db, int interval, time_t start_time) +void sys_tree__update(struct mosquitto_db *db, int interval, time_t start_time) { static time_t last_update = 0; time_t now; @@ -206,7 +206,7 @@ void sys__update(struct mosquitto_db *db, int interval, time_t start_time) snprintf(buf, BUFLEN, "%d seconds", (int)uptime); db__messages_easy_queue(db, NULL, "$SYS/broker/uptime", 2, strlen(buf), buf, 1); - sys__update_clients(db, buf); + sys_tree__update_clients(db, buf); if(last_update > 0){ i_mult = 60.0/(double)(now-last_update); @@ -284,7 +284,7 @@ void sys__update(struct mosquitto_db *db, int interval, time_t start_time) } #ifdef REAL_WITH_MEMORY_TRACKING - sys__update_memory(db, buf); + sys_tree__update_memory(db, buf); #endif if(msgs_received != g_msgs_received){