Fix mistakes

This commit is contained in:
counterpoint
2015-11-19 15:51:18 +00:00
parent e7a30a7944
commit a58b25d6c3
2 changed files with 4 additions and 3 deletions

View File

@ -42,6 +42,7 @@
#include <log_manager.h>
#include <secrets.h>
#include <maxscale_pcre2.h>
#include <externcmd.h>
#include <mysql/mysqld_error.h>
static MONITOR *allMonitors = NULL;
@ -670,7 +671,7 @@ mon_get_event_type(MONITOR_SERVERS* node)
* @param node The monitor server data whose event is wanted
* @result string The name of the monitor event for the server
*/
char*
const char*
mon_get_event_name(MONITOR_SERVERS* node)
{
return monitor_event_definitions[mon_get_event_type(node)].name;
@ -714,7 +715,7 @@ mon_append_node_names(MONITOR_SERVERS* servers, char* dest, int len)
{
if (SERVER_IS_RUNNING(servers->server))
{
strcat(dest, separator, len);
strcat(dest, separator);
separator = ",";
snprintf(arr, sizeof(arr), "%s:%d", servers->server->name, servers->server->port);
strncat(dest, arr, len - strlen(dest) - 1);

View File

@ -220,7 +220,7 @@ bool check_monitor_permissions(MONITOR* monitor);
monitor_event_t mon_name_to_event(char* tok);
void mon_append_node_names(MONITOR_SERVERS* start, char* str, int len);
monitor_event_t mon_get_event_type(MONITOR_SERVERS* node);
char* mon_get_event_name(MONITOR_SERVERS* node);
const char* mon_get_event_name(MONITOR_SERVERS* node);
void monitor_clear_pending_status(MONITOR_SERVERS *ptr, int bit);
void monitor_set_pending_status(MONITOR_SERVERS *ptr, int bit);
bool mon_status_changed(MONITOR_SERVERS* mon_srv);