Ndbclustermon formatting changes
Fixed indentation, bracket alignment and other minor things.
This commit is contained in:
@ -115,7 +115,9 @@ startMonitor(void *arg,void* opt)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((handle = (MYSQL_MONITOR *) malloc(sizeof(MYSQL_MONITOR))) == NULL)
|
if ((handle = (MYSQL_MONITOR *) malloc(sizeof(MYSQL_MONITOR))) == NULL)
|
||||||
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
handle->shutdown = 0;
|
handle->shutdown = 0;
|
||||||
handle->id = MONITOR_DEFAULT_ID;
|
handle->id = MONITOR_DEFAULT_ID;
|
||||||
handle->script = NULL;
|
handle->script = NULL;
|
||||||
@ -139,11 +141,16 @@ startMonitor(void *arg,void* opt)
|
|||||||
}
|
}
|
||||||
else if (!strcmp(params->name, "events"))
|
else if (!strcmp(params->name, "events"))
|
||||||
{
|
{
|
||||||
if(mon_parse_event_string((bool*)&handle->events,sizeof(handle->events),params->value) != 0)
|
if (mon_parse_event_string((bool*) &handle->events,
|
||||||
|
sizeof(handle->events), params->value) != 0)
|
||||||
|
{
|
||||||
script_error = true;
|
script_error = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
have_events = true;
|
have_events = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
params = params->next;
|
params = params->next;
|
||||||
}
|
}
|
||||||
if (script_error)
|
if (script_error)
|
||||||
@ -236,7 +243,9 @@ char *server_string;
|
|||||||
|
|
||||||
/* Don't even probe server flagged as in maintenance */
|
/* Don't even probe server flagged as in maintenance */
|
||||||
if (SERVER_IN_MAINT(database->server))
|
if (SERVER_IN_MAINT(database->server))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
connect_result_t rval = mon_connect_to_db(mon, database);
|
connect_result_t rval = mon_connect_to_db(mon, database);
|
||||||
if (rval != MONITOR_CONN_OK)
|
if (rval != MONITOR_CONN_OK)
|
||||||
@ -314,10 +323,13 @@ char *server_string;
|
|||||||
mysql_free_result(result);
|
mysql_free_result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isjoined) {
|
if (isjoined)
|
||||||
|
{
|
||||||
server_set_status(database->server, SERVER_NDB);
|
server_set_status(database->server, SERVER_NDB);
|
||||||
database->server->depth = 0;
|
database->server->depth = 0;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
server_clear_status(database->server, SERVER_NDB);
|
server_clear_status(database->server, SERVER_NDB);
|
||||||
database->server->depth = -1;
|
database->server->depth = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user