[open-ils-commits] r10331 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 11 11:11:37 EDT 2008
Author: erickson
Date: 2008-08-11 11:11:35 -0400 (Mon, 11 Aug 2008)
New Revision: 10331
Modified:
trunk/Open-ILS/src/c-apps/oils_auth.c
Log:
return workstation not found even if the results is a JSON NULL. free the NULL object
Modified: trunk/Open-ILS/src/c-apps/oils_auth.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_auth.c 2008-08-11 13:34:23 UTC (rev 10330)
+++ trunk/Open-ILS/src/c-apps/oils_auth.c 2008-08-11 15:11:35 UTC (rev 10331)
@@ -320,7 +320,10 @@
const osrfMethodContext* ctx, jsonObject* userObj, const char* ws ) {
osrfLogInfo(OSRF_LOG_MARK, "Attaching workstation to user at login: %s", ws);
jsonObject* workstation = oilsUtilsFetchWorkstationByName(ws);
- if(!workstation) return oilsNewEvent(OSRF_LOG_MARK, "WORKSTATION_NOT_FOUND");
+ if(!workstation || workstation->type == JSON_NULL) {
+ jsonObjectFree(workstation);
+ return oilsNewEvent(OSRF_LOG_MARK, "WORKSTATION_NOT_FOUND");
+ }
long wsid = oilsFMGetObjectId(workstation);
LONG_TO_STRING(wsid);
char* orgid = oilsFMGetString(workstation, "owning_lib");
More information about the open-ils-commits
mailing list