***SPAM*** [OpenSRF-GIT] OpenSRF branch master updated. 96917538c6b6fad688dd40c2a8f0cc9127053b24
Evergreen Git
git at git.evergreen-ils.org
Wed Aug 20 17:18:54 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSRF".
The branch, master has been updated
via 96917538c6b6fad688dd40c2a8f0cc9127053b24 (commit)
from 6cdd5251ac64651534e579f7e02a70a665f60283 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 96917538c6b6fad688dd40c2a8f0cc9127053b24
Author: Mike Rylander <mrylander at gmail.com>
Date: Wed Jul 30 13:29:46 2014 -0400
LP#1350457: Pass caller's session to subrequests called via method_lookup
In the process of looking up a method for an internal subrequest, we lose
session info. This is a problem when the subrequest makes a remote request,
because then the subrequest can't look up the proper locale, among other
things. The forthcoming branch passes the caller's session to the subrequest.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
diff --git a/src/perl/lib/OpenSRF/Application.pm b/src/perl/lib/OpenSRF/Application.pm
index 5ae98bf..d409957 100644
--- a/src/perl/lib/OpenSRF/Application.pm
+++ b/src/perl/lib/OpenSRF/Application.pm
@@ -171,6 +171,7 @@ sub handler {
if (ref $coderef) {
my @args = $app_msg->params;
+ $coderef->session( $session );
my $appreq = OpenSRF::AppRequest->new( $session );
$appreq->max_chunk_size( $coderef->max_chunk_size );
$appreq->max_chunk_count( $coderef->max_chunk_count );
@@ -558,6 +559,7 @@ sub method_lookup {
$meth = $self->method_lookup($method,$proto,1);
}
+ $meth->session($self->session) if $meth; # Pass the caller's session
return $meth;
}
@@ -571,9 +573,7 @@ sub run {
if ( !UNIVERSAL::isa($req, 'OpenSRF::AppRequest') ) {
$log->debug("Creating a SubRequest object", DEBUG);
unshift @params, $req;
- $req = OpenSRF::AppSubrequest->new;
- $req->session( $self->session ) if ($self->session);
-
+ $req = OpenSRF::AppSubrequest->new( session => $self->session );
} else {
$log->debug("This is a top level request", DEBUG);
}
-----------------------------------------------------------------------
Summary of changes:
src/perl/lib/OpenSRF/Application.pm | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
OpenSRF
More information about the opensrf-commits
mailing list