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
|
||||
{
|
||||
if ((handle = (MYSQL_MONITOR *) malloc(sizeof(MYSQL_MONITOR))) == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
handle->shutdown = 0;
|
||||
handle->id = MONITOR_DEFAULT_ID;
|
||||
handle->script = NULL;
|
||||
@ -139,11 +141,16 @@ startMonitor(void *arg,void* opt)
|
||||
}
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
have_events = true;
|
||||
}
|
||||
}
|
||||
params = params->next;
|
||||
}
|
||||
if (script_error)
|
||||
@ -236,7 +243,9 @@ char *server_string;
|
||||
|
||||
/* Don't even probe server flagged as in maintenance */
|
||||
if (SERVER_IN_MAINT(database->server))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
connect_result_t rval = mon_connect_to_db(mon, database);
|
||||
if (rval != MONITOR_CONN_OK)
|
||||
@ -314,10 +323,13 @@ char *server_string;
|
||||
mysql_free_result(result);
|
||||
}
|
||||
|
||||
if (isjoined) {
|
||||
if (isjoined)
|
||||
{
|
||||
server_set_status(database->server, SERVER_NDB);
|
||||
database->server->depth = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
server_clear_status(database->server, SERVER_NDB);
|
||||
database->server->depth = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user