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:
@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user