Return proper renewal OK field on checkout fail
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 18 Oct 2011 19:08:50 +0000 (15:08 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Tue, 15 Nov 2011 21:52:36 +0000 (16:52 -0500)
This will allow (hopefully) the self check to know that a renewal was
attempted on checkout failure (if the flag is set).

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Sip/MsgType.pm

index 8aeb9f7..783bf63 100644 (file)
@@ -593,7 +593,7 @@ sub handle_checkout {
        # Checkout failed
        # Checkout Response: not ok, no renewal, don't know mag. media,
        # no desensitize
-       $resp = sprintf("120NUN%s", Sip::timestamp);
+       $resp = sprintf("120%sUN%s", sipbool($status->renew_ok), Sip::timestamp);
        $resp .= add_field(FID_INST_ID, $inst);
        $resp .= add_field(FID_PATRON_ID, $patron_id);
        $resp .= add_field(FID_ITEM_ID, $item_id);