[open-ils-commits] r19551 - trunk/Open-ILS/src/c-apps (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 1 13:10:01 EST 2011


Author: erickson
Date: 2011-03-01 13:09:57 -0500 (Tue, 01 Mar 2011)
New Revision: 19551

Modified:
   trunk/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: trunk/Open-ILS/src/c-apps/oils_auth.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_auth.c	2011-03-01 16:23:49 UTC (rev 19550)
+++ trunk/Open-ILS/src/c-apps/oils_auth.c	2011-03-01 18:09:57 UTC (rev 19551)
@@ -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