X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fmysql.c;h=7fe6d76470724861304a0a601d24c1993d19da2b;hp=b6edce0d36115192752fe2a12bb9b4f3f864e27f;hb=7111bb6df7628edce3a8e538b386fbe27633a191;hpb=c144ae4659e129a929afb67706a54604220fef43 diff --git a/src/mysql.c b/src/mysql.c index b6edce0d..7fe6d764 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) - ssnprintf(cb_name, sizeof(cb_name), "mysql-%s", db->instance); + snprintf(cb_name, sizeof(cb_name), "mysql-%s", db->instance); else sstrncpy(cb_name, "mysql", sizeof(cb_name)); @@ -496,15 +496,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; - ssnprintf(n.message, sizeof(n.message), - "slave I/O thread not started or not connected to master"); + snprintf(n.message, sizeof(n.message), + "slave I/O thread not started or not connected to master"); plugin_dispatch_notification(&n); db->slave_io_running = 0; } else if (((io != NULL) && (strcasecmp(io, "yes") == 0)) && (!db->slave_io_running)) { n.severity = NOTIF_OKAY; - ssnprintf(n.message, sizeof(n.message), - "slave I/O thread started and connected to master"); + snprintf(n.message, sizeof(n.message), + "slave I/O thread started and connected to master"); plugin_dispatch_notification(&n); db->slave_io_running = 1; } @@ -512,13 +512,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; - ssnprintf(n.message, sizeof(n.message), "slave SQL thread not started"); + snprintf(n.message, sizeof(n.message), "slave SQL thread not started"); plugin_dispatch_notification(&n); db->slave_sql_running = 0; } else if (((sql != NULL) && (strcasecmp(sql, "yes") == 0)) && (!db->slave_sql_running)) { n.severity = NOTIF_OKAY; - ssnprintf(n.message, sizeof(n.message), "slave SQL thread started"); + snprintf(n.message, sizeof(n.message), "slave SQL thread started"); plugin_dispatch_notification(&n); db->slave_sql_running = 1; }