MXS-1220: Add deletion of listeners

The listeners can now be deleted via the REST API. Documented the added
endpoint in the REST API documentation.
This commit is contained in:
Markus Mäkelä
2017-07-03 20:18:45 +03:00
parent 7e40c93cc4
commit 35745ee925
5 changed files with 85 additions and 0 deletions

View File

@ -796,6 +796,22 @@ bool serviceHasListener(SERVICE *service, const char *protocol,
return false;
}
bool service_has_named_listener(SERVICE *service, const char *name)
{
LISTENER_ITERATOR iter;
for (SERV_LISTENER *listener = listener_iterator_init(service, &iter);
listener; listener = listener_iterator_next(&iter))
{
if (listener_is_active(listener) && strcmp(listener->name, name) == 0)
{
return true;
}
}
return false;
}
/**
* Allocate a new server reference
*