X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fmysql.c;fp=src%2Fmysql.c;h=5244d29c3100d87e5b9dc0d6480ed05bf3f9e2ea;hp=7399fe21def999a275584f18501d634898a02a4b;hb=abaa1c8a24e8eff5632dd6052b1da5f6535caf19;hpb=47a8c3f0893a4ad8ef8f690ae0bd496ef55dcdcd diff --git a/src/mysql.c b/src/mysql.c index 7399fe21..5244d29c 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -218,7 +218,7 @@ static int mysql_config_database(oconfig_item_t *ci) /* {{{ */ (db->database != NULL) ? db->database : ""); if (db->instance != NULL) - snprintf(cb_name, sizeof(cb_name), "mysql-%s", db->instance); + ssnprintf(cb_name, sizeof(cb_name), "mysql-%s", db->instance); else sstrncpy(cb_name, "mysql", sizeof(cb_name)); @@ -500,14 +500,14 @@ static int mysql_read_slave_stats(mysql_database_t *db, MYSQL *con) { if (((io == NULL) || (strcasecmp(io, "yes") != 0)) && (db->slave_io_running)) { n.severity = NOTIF_WARNING; - snprintf(n.message, sizeof(n.message), + ssnprintf(n.message, sizeof(n.message), "slave I/O thread not started or not connected to master"); plugin_dispatch_notification(&n); db->slave_io_running = false; } else if (((io != NULL) && (strcasecmp(io, "yes") == 0)) && (!db->slave_io_running)) { n.severity = NOTIF_OKAY; - snprintf(n.message, sizeof(n.message), + ssnprintf(n.message, sizeof(n.message), "slave I/O thread started and connected to master"); plugin_dispatch_notification(&n); db->slave_io_running = true; @@ -516,13 +516,13 @@ static int mysql_read_slave_stats(mysql_database_t *db, MYSQL *con) { if (((sql == NULL) || (strcasecmp(sql, "yes") != 0)) && (db->slave_sql_running)) { n.severity = NOTIF_WARNING; - snprintf(n.message, sizeof(n.message), "slave SQL thread not started"); + ssnprintf(n.message, sizeof(n.message), "slave SQL thread not started"); plugin_dispatch_notification(&n); db->slave_sql_running = false; } else if (((sql != NULL) && (strcasecmp(sql, "yes") == 0)) && (!db->slave_sql_running)) { n.severity = NOTIF_OKAY; - snprintf(n.message, sizeof(n.message), "slave SQL thread started"); + ssnprintf(n.message, sizeof(n.message), "slave SQL thread started"); plugin_dispatch_notification(&n); db->slave_sql_running = true; }