MXS-2196: Replace listener iterator
The iteration of listeners is now done via the global list of listeners. This removes the need to have a service before a listener is accessed which also reflects how the actual configuration is laid out. It also guarantees that any results returned by the find functions will be valid as long as the results are used.
This commit is contained in:
@ -266,10 +266,8 @@ LocalClient* LocalClient::create(MYSQL_session* session, MySQLProtocol* proto, c
|
||||
LocalClient* LocalClient::create(MYSQL_session* session, MySQLProtocol* proto, SERVICE* service)
|
||||
{
|
||||
LocalClient* rval = NULL;
|
||||
LISTENER_ITERATOR iter;
|
||||
|
||||
for (SERV_LISTENER* listener = listener_iterator_init(service, &iter);
|
||||
listener; listener = listener_iterator_next(&iter))
|
||||
for (const auto& listener : listener_find_by_service(service))
|
||||
{
|
||||
if (listener->port > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user