From e84a166b138693e54319cc458cecb1586edd98cc Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 2 Aug 2007 03:03:35 +0000 Subject: [PATCH] unbreaking the perl session locale stuff git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1067 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/AppSession.pm | 8 +------- src/perlmods/OpenSRF/DomainObject/oilsMessage.pm | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/perlmods/OpenSRF/AppSession.pm b/src/perlmods/OpenSRF/AppSession.pm index 3b79359..517fdf8 100644 --- a/src/perlmods/OpenSRF/AppSession.pm +++ b/src/perlmods/OpenSRF/AppSession.pm @@ -750,13 +750,7 @@ sub recv { $logger->debug( "Number of matched responses: " . @list, DEBUG ); $self->queue_wait(0); # check for statuses - if (!wantarray) { - $self->session_locale( $list[0]->sender_locale ); - return $list[0]; - } else { - $self->session_locale( $list[-1]->sender_locale ); - } - + return $list[0] if (!wantarray); return @list; } diff --git a/src/perlmods/OpenSRF/DomainObject/oilsMessage.pm b/src/perlmods/OpenSRF/DomainObject/oilsMessage.pm index 495e33a..19a4c12 100644 --- a/src/perlmods/OpenSRF/DomainObject/oilsMessage.pm +++ b/src/perlmods/OpenSRF/DomainObject/oilsMessage.pm @@ -181,12 +181,14 @@ sub handler { my $session = shift; my $mtype = $self->type; + my $locale = $self->sender_locale; my $api_level = $self->api_level || 1;; my $tT = $self->threadTrace; $session->last_message_type($mtype); $session->last_message_api_level($api_level); $session->last_threadTrace($tT); + $session->session_locale($locale); $log->debug(" Received api_level => [$api_level], MType => [$mtype], ". "from [".$session->remote_id."], threadTrace[".$self->threadTrace."]"); -- 2.11.0