SIP re-login fetches correct auth session
authorBill Erickson <berick@esilibrary.com>
Fri, 3 Aug 2012 19:08:51 +0000 (15:08 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 29 Jan 2013 10:39:21 +0000 (05:39 -0500)
commit6923e8d38550a73b557ef9b991eefce4a8314f37
treef5077ac7c7103bcfc10b8ce8c8a944215588588e
parentd6a050d34feea5bdaeb9e38fb984456b4014f2b1
SIP re-login fetches correct auth session

After a login session expires and the SIP server logs in again to
acquire a new authtoken, be sure to use the new authtoken when fetching
the new session object.  Otherwise, the login_session is left undef and
you may see errors like this when checking in items:

Can't call method "ws_ou" on an undefined value at
/usr/local/share/perl/5.10.1/OpenILS/SIP/Transaction/Checkin.pm line 77.

Incidentally, the checkin code is the only code that references
$sip_handler->{login_session}.  And the problem listed above only occurs
when the login session expires just prior to a checkin call.  In any
other scenario, the login_session would ultimately get repaired.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/SIP.pm