X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmysql.c;h=7ba10f694698b5bfcfffbb0ddbf8e9c5358133d5;hb=a72ad42076337f3b85db3b06565ae86a83226ab3;hp=0eba01fa64fdc12ac6541397205c8e5b2e4c9447;hpb=434efdd75ae1fc215a65a30c982af100506c0404;p=collectd.git diff --git a/src/mysql.c b/src/mysql.c index 0eba01fa..7ba10f69 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,15 +500,15 @@ 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), - "slave I/O thread not started or not connected to master"); + 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), - "slave I/O thread started and connected to master"); + 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; }