[shibboleth-sp2] 22/100: Keep client handle in scope until resources are freed.

Ferenc Wágner wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to annotated tag 1.2.1
in repository shibboleth-sp2.

commit 8fcbc48633418eaeafa4de93c1f56a1d8f82090a
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Mon Oct 11 18:37:35 2004 +0000

    Keep client handle in scope until resources are freed.
---
 shib-target/shib-rm.cpp    | 2 +-
 shib-target/shib-shire.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/shib-target/shib-rm.cpp b/shib-target/shib-rm.cpp
index 067417e..deea26b 100644
--- a/shib-target/shib-rm.cpp
+++ b/shib-target/shib-rm.cpp
@@ -131,7 +131,6 @@ RPCError* RM::getAssertions(
     }
     else {
       // SUCCESS.  Release back into pool
-      rpc.pool();
       retry = -1;
     }
   } while (retry>=0);
@@ -186,6 +185,7 @@ RPCError* RM::getAssertions(
   }
 
   clnt_freeres(clnt, (xdrproc_t)xdr_shibrpc_get_assertions_ret_1, (caddr_t)&ret);
+  rpc.pool();
 
   log.debug ("returning..");
   return retval;
diff --git a/shib-target/shib-shire.cpp b/shib-target/shib-shire.cpp
index f2376d9..eacb67a 100644
--- a/shib-target/shib-shire.cpp
+++ b/shib-target/shib-shire.cpp
@@ -426,8 +426,7 @@ RPCError* SHIRE::sessionIsValid(const char* session_id, const char* ip) const
           return new RPCError(-1, "RPC Failure");
     }
     else {
-      // SUCCESS.  Return to the pool.
-      rpc.pool();
+      // SUCCESS
       retry = -1;
     }
   } while (retry>=0);
@@ -441,6 +440,7 @@ RPCError* SHIRE::sessionIsValid(const char* session_id, const char* ip) const
     retval = new RPCError();
 
   clnt_freeres (clnt, (xdrproc_t)xdr_shibrpc_session_is_valid_ret_1, (caddr_t)&ret);
+  rpc.pool();
 
   log.debug("returning");
   return retval;
@@ -498,7 +498,6 @@ RPCError* SHIRE::sessionCreate(const char* response, const char* ip, string& coo
     }
     else {
       // SUCCESS.  Pool and continue
-      rpc.pool();
       retry = -1;
     }
   } while (retry>=0);
@@ -515,6 +514,7 @@ RPCError* SHIRE::sessionCreate(const char* response, const char* ip, string& coo
   }
 
   clnt_freeres(clnt, (xdrproc_t)xdr_shibrpc_new_session_ret_1, (caddr_t)&ret);
+  rpc.pool();
 
   log.debug("returning");
   return retval;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list