Ensure that if we are asked for summary information in Patron Information that
we have any form of definition for it *and* we have code to call. If neither
case is true pretend they didn't ask for any to begin with.
Testing notes
-------------
Here is an example of the sort of request that, prior to this patch,
could cause a SIPServer backend to crash:
6300020150615 111700 Y AOUinst|AAuser|
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
return '';
}
+ if ($summary_type > $#summary_map || not defined $summary_map[$summary_type]->{func}) {
+ # Huh, we don't have any code to handle the requested summary information.
+ # Pretend nothing was asked for instead.
+ return '';
+ }
+
syslog("LOG_DEBUG", "Summary_info: index == '%d', field '%s'",
$summary_type, $summary_map[$summary_type]->{fid});