[open-ils-commits] r19571 - branches/rel_2_0/Open-ILS/src/c-apps (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 3 11:04:40 EST 2011


Author: erickson
Date: 2011-03-03 11:04:38 -0500 (Thu, 03 Mar 2011)
New Revision: 19571

Modified:
   branches/rel_2_0/Open-ILS/src/c-apps/oils_auth.c
Log:
when using the force-reload option to reset timeout, propagate the ws_ou and wsid values from the cached user object into the reloaded user object

Modified: branches/rel_2_0/Open-ILS/src/c-apps/oils_auth.c
===================================================================
--- branches/rel_2_0/Open-ILS/src/c-apps/oils_auth.c	2011-03-03 16:04:08 UTC (rev 19570)
+++ branches/rel_2_0/Open-ILS/src/c-apps/oils_auth.c	2011-03-03 16:04:38 UTC (rev 19571)
@@ -719,6 +719,12 @@
     osrfAppSessionFree(session); // calls disconnect internally
 
     if(newUserObj) {
+
+        // ws_ou and wsid are ephemeral and need to be manually propagated
+        // oilsFMSetString dupe()'s internally, no need to clone the string
+        oilsFMSetString(newUserObj, "wsid", oilsFMGetStringConst(userObj, "wsid"));
+        oilsFMSetString(newUserObj, "ws_ou", oilsFMGetStringConst(userObj, "ws_ou"));
+
         jsonObjectRemoveKey(cacheObj, "userobj"); // this also frees the old user object
         jsonObjectSetKey(cacheObj, "userobj", newUserObj);
         return 1;



More information about the open-ils-commits mailing list