SIP re-login fetches correct auth session collab/berick/sip-re-login-repair
authorBill Erickson <berick@esilibrary.com>
Fri, 3 Aug 2012 19:08:51 +0000 (15:08 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 3 Aug 2012 19:08:51 +0000 (15:08 -0400)
commitfea4a57c487ffb82d89a89028ef6b9faf2ce3293
treee9b8eb70f0ab4da9b382fbf7c408a10b96773c49
parentb3a794f4e5a26fb3714665aa5cb15897ddcaefb4
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