[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 3798b73a1625f4ea61dd3b206ff479cf39140317

Evergreen Git git at git.evergreen-ils.org
Thu Aug 7 12:01:05 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 "Evergreen ILS".

The branch, master has been updated
       via  3798b73a1625f4ea61dd3b206ff479cf39140317 (commit)
       via  3ffe1142136ef6906b3a3bd968ec2b16b798ab42 (commit)
      from  dc70c30e85ef5c4184be26966b2f8e7a77d94ea1 (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 3798b73a1625f4ea61dd3b206ff479cf39140317
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Oct 9 11:36:52 2013 -0400

    LP#1339190: Have Evergreen save authtoken state to support IO::Multiplex mode
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
index 8098d84..664bb62 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
@@ -47,7 +47,7 @@ sub disconnect {
 }
 
 sub new {
-    my ($class, $institution, $login) = @_;
+    my ($class, $institution, $login, $state) = @_;
     my $type = ref($class) || $class;
     my $self = {};
 
@@ -76,7 +76,7 @@ sub new {
     bless( $self, $type );
 
     return undef unless 
-        $self->login( $login->{id}, $login->{password} );
+        $self->login( $login->{id}, $login->{password}, $state );
 
     return $self;
 }
@@ -224,9 +224,15 @@ sub format_date {
 
 
 sub login {
-    my( $self, $username, $password ) = @_;
+    my( $self, $username, $password, $state ) = @_;
     syslog('LOG_DEBUG', "OILS: Logging in with username $username");
 
+
+    if ($state and ref $state and $$state{authtoken}) {
+        $self->{authtoken} = $$state{authtoken};
+        return $self->{authtoken} if ($self->fetch_session); # fetch the session
+    }
+
     my $nonce = rand($$);
     my $seed = $U->simplereq( 
         'open-ils.auth',
@@ -259,6 +265,11 @@ sub login {
     return $key;
 }
 
+sub state {
+    my $self = shift;
+    return { authtoken => $self->{authtoken} };
+}
+
 #
 # find_patron($barcode);
 # find_patron(barcode => $barcode);   # same as above

commit 3ffe1142136ef6906b3a3bd968ec2b16b798ab42
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Sep 11 16:02:24 2013 -0400

    LP#1339190: support disconnection for SIP multiplex purposes
    
    This patch adds a disconnect method to close the OpenSRF
    connect; this method is invoked only when the Net::Server::Multiplex
    personality is in use.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
index a984200..8098d84 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
@@ -42,6 +42,10 @@ use constant {
     SIP_DATETIME => "%Y%m%d    %H%M%S",
 };
 
+sub disconnect {
+     OpenSRF::Transport::PeerHandle->retrieve->disconnect
+}
+
 sub new {
     my ($class, $institution, $login) = @_;
     my $type = ref($class) || $class;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/SIP.pm |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list