MXS-1689 Properly check for duplicate port/socket of service
It is now impossible to create two listeners for a service that would listen on the same port/socket (as before), but the error message is now sensible and provides detailed information to the user.
This commit is contained in:
@ -236,6 +236,24 @@ bool serviceAddBackend(SERVICE *service, SERVER *server);
|
||||
*/
|
||||
bool serviceHasBackend(SERVICE *service, SERVER *server);
|
||||
|
||||
/**
|
||||
* @brief Find listener with specified properties.
|
||||
*
|
||||
* @param service Service to check
|
||||
* @param socket Listener socket path
|
||||
* @param address Listener address
|
||||
* @param port Listener port number
|
||||
*
|
||||
* @note Either socket should be NULL and port non-zero or socket
|
||||
* non-NULL and port zero.
|
||||
*
|
||||
* @return True if service has the listener
|
||||
*/
|
||||
SERV_LISTENER* service_find_listener(SERVICE* service,
|
||||
const char* socket,
|
||||
const char* address,
|
||||
unsigned short port);
|
||||
|
||||
/**
|
||||
* @brief Check if a service has a listener
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user