Bug 11701: Fix C4::Context::Zconn
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 13 Nov 2013 13:21:40 +0000 (14:21 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 25 Mar 2014 14:43:03 +0000 (14:43 +0000)
commit9b63f0d018ecaa6377124175142826658cb4dd05
treeecc8c6c1015026a87298caa1ec95dd01318bdf8e
parent8205529683da0f934f4bdb26ccd54f05b8246d0a
Bug 11701: Fix C4::Context::Zconn

When calling C4::Context::Zconn twice with different parameters,
the same ZOOM::Connection object is returned twice (parameters
of 2nd call are not used) This patch fixes that.

This is in part because the connection cache is keyed on server
name only. This patch corrects this by keying on all parameters.

TEST PLAN
---------
1) apply patch
2) run koha qa test tools
3) prove -v t/Context.t

The unit tests properly triggers the modified routine for
testing. Additionally, in hunting for ways it could break,
no nested synchronous or asynchronous Zconn's were found.
And even if they were, the keying on all parameters should allow
it to function properly without messing up the other connection.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Context.pm