From 7ffae62b92da5a3561d98d10cdc922bd3c55d10b Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Fri, 29 Apr 2011 16:45:55 -0400 Subject: [PATCH] Support ILS-defined extension fields Signed-off-by: Thomas Berezansky --- Sip/MsgType.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index e5bd74c..7649731 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -982,6 +982,16 @@ sub handle_patron_info { $resp .= maybe_add(FID_SCREEN_MSG, $patron->screen_msg); $resp .= maybe_add(FID_PRINT_LINE, $patron->print_line); + + # Custom ILS-defined protocol extensions + if ($patron->can('extra_fields')) { + my $extra_fields = $patron->extra_fields(); + foreach my $field (keys %$extra_fields) { + foreach my $value (@{$extra_fields->{ $field }}) { + $resp .= maybe_add($field, $value); + } + } + } } else { # Invalid patron ID # He has no privileges, no items associated with him, -- 2.11.0