From d148831f7e84e306dc96ac7968f68dc9b29d841c Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 3 Mar 2006 21:28:27 +0000 Subject: [PATCH] now using workstation as the org for auth session timeouts if available git-svn-id: svn://svn.open-ils.org/ILS/trunk@3256 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/c-apps/oils_auth.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/c-apps/oils_auth.c b/Open-ILS/src/c-apps/oils_auth.c index 168e68ccd3..15986e2747 100644 --- a/Open-ILS/src/c-apps/oils_auth.c +++ b/Open-ILS/src/c-apps/oils_auth.c @@ -251,7 +251,18 @@ oilsEvent* oilsAuthHandleLoginOK( oilsEvent* response; osrfLogActivity(OSRF_LOG_MARK, "User %s successfully logged in", uname ); - double timeout = oilsAuthGetTimeout( userObj, type, orgloc ); + double timeout; + char* wsorg = jsonObjectToSimpleString(oilsFMGetObject(userObj, "ws_ou")); + if(wsorg) { /* if there is a workstation, use it for the timeout */ + osrfLogDebug( OSRF_LOG_MARK, + "Auth session trying workstation id %d for auth timeout", atoi(wsorg)); + timeout = oilsAuthGetTimeout( userObj, type, atoi(wsorg) ); + free(wsorg); + } else { + osrfLogDebug( OSRF_LOG_MARK, + "Auth session trying org from param [%d] for auth timeout", orgloc ); + timeout = oilsAuthGetTimeout( userObj, type, orgloc ); + } osrfLogDebug(OSRF_LOG_MARK, "Auth session timeout for %s: %lf", uname, timeout ); char* string = va_list_to_string( -- 2.43.2