Shutdown all monitors when shutting down the gateway
This commit is contained in:
@ -104,6 +104,24 @@ MONITOR *ptr;
|
||||
free(mon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdown all running monitors
|
||||
*/
|
||||
void
|
||||
monitorStopAll()
|
||||
{
|
||||
MONITOR *ptr;
|
||||
|
||||
spinlock_acquire(&monLock);
|
||||
ptr = allMonitors;
|
||||
while (ptr)
|
||||
{
|
||||
ptr->module->stopMonitor(ptr->handle);
|
||||
ptr = ptr->next;
|
||||
}
|
||||
spinlock_release(&monLock);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a server to a monitor. Simply register the server that needs to be
|
||||
* monitored to the running monitor module.
|
||||
|
Reference in New Issue
Block a user