[OPEN-ILS-DEV] Recent commit to Application.pm

Dan Scott denials at gmail.com
Sun Nov 4 07:08:07 EST 2007


Hi, I recently committed a change to
trunk/src/perlmods/OpenSRF/Application.pm handler() method that silences a
raw Perl warning when a message with no parameters is received. However, I
just wanted to confirm that it is legal for OpenSRF messages to not have any
parms; if that's not legal, then I should also log an error. I don't want to
hush what could potentially be an error condition. I apologize if the
expected behaviour is defined somewhere; I tried finding info in the wiki on
the OpenSRF API but didn't find a spec for this instance.

The affected code follows:

sub handler {
    my ($self, $session, $app_msg) = @_;

    if( ! $app_msg ) {
        return 1;  # error?
    }

    my $app = $self->application_implementation;

    if ($session->last_message_type eq 'REQUEST') {

        my @p = $app_msg->params;
        my $method_name = $app_msg->method;
        my $method_proto = $session->last_message_api_level;
        $log->info("CALL: $method_name [". (@p ? join(', ', at p) : '') ."]");


-- 
Dan Scott
Laurentian University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20071104/9e6a8916/attachment.html


More information about the Open-ils-dev mailing list