MXS-2196: Fix persistent connections

The connections now use the correct parameter.
This commit is contained in:
Markus Mäkelä 2018-12-04 13:02:06 +02:00
parent 3cc34f0696
commit 7ca421fe5f
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -261,17 +261,18 @@ DCB* server_get_persistent(SERVER* server, const char* user, const char* ip, con
&& server->persistent[id] // Check after cleaning
&& (server->status & SERVER_RUNNING))
{
mxb_assert(dcb->server);
dcb = server->persistent[id];
while (dcb)
{
// TODO: Fix this, it won't work (DCB in pool has no session)
if (dcb->user
&& dcb->remote
&& ip
&& !dcb->dcb_errhandle_called
&& 0 == strcmp(dcb->user, user)
&& 0 == strcmp(dcb->remote, ip)
&& 0 == strcmp(dcb->session->listener->protocol(), protocol))
&& 0 == strcmp(dcb->server->protocol, protocol))
{
if (NULL == previous)
{