"successful login: username=%s, authtoken=%s, workstation=%s", uname, authToken, ws );
oilsFMSetString( userObj, "passwd", "" );
- jsonObject* cacheObj = jsonParseStringFmt("{\"authtime\": %f}", timeout);
+ jsonObject* cacheObj = jsonParseFmt("{\"authtime\": %f}", timeout);
jsonObjectSetKey( cacheObj, "userobj", jsonObjectClone(userObj));
osrfCachePutObject( authKey, cacheObj, timeout );
jsonObjectFree(cacheObj);
osrfLogInternal(OSRF_LOG_MARK, "oilsAuthHandleLoginOK(): Placed user object into cache");
- jsonObject* payload = jsonParseStringFmt(
+ jsonObject* payload = jsonParseFmt(
"{ \"authtoken\": \"%s\", \"authtime\": %f }", authToken, timeout );
response = oilsNewEvent2( OSRF_LOG_MARK, OILS_EVENT_SUCCESS, payload );
if(!barcode) return NULL;
osrfLogDebug(OSRF_LOG_MARK, "Checking to see if barcode %s is active", barcode);
- jsonObject* params = jsonParseStringFmt("{\"barcode\":\"%s\"}", barcode);
+ jsonObject* params = jsonParseFmt("{\"barcode\":\"%s\"}", barcode);
jsonObject* card = oilsUtilsQuickReq(
"open-ils.cstore", "open-ils.cstore.direct.actor.card.search", params );
jsonObjectFree(params);
oilsEvent* evt = NULL;
if (orgid == -1) {
- jsonObject* where_clause = jsonParseString( "{\"parent_ou\":null}" );
+ jsonObject* where_clause = jsonParse( "{\"parent_ou\":null}" );
jsonObject* org = oilsUtilsQuickReq(
"open-ils.cstore",
"open-ils.cstore.direct.actor.org_unit.search",
for( i = 0; i < size && permissions[i]; i++ ) {
char* perm = permissions[i];
- jsonObject* params = jsonParseStringFmt("[%d, \"%s\", %d]", userid, perm, orgid);
+ jsonObject* params = jsonParseFmt("[%d, \"%s\", %d]", userid, perm, orgid);
jsonObject* o = oilsUtilsQuickReq( "open-ils.storage",
"open-ils.storage.permission.user_has_perm", params );
jsonObject* oilsUtilsFetchUserByUsername( const char* name ) {
if(!name) return NULL;
- jsonObject* params = jsonParseStringFmt("{\"usrname\":\"%s\"}", name);
+ jsonObject* params = jsonParseFmt("{\"usrname\":\"%s\"}", name);
jsonObject* user = oilsUtilsQuickReq(
"open-ils.cstore", "open-ils.cstore.direct.actor.user.search", params );
osrfLogInfo(OSRF_LOG_MARK, "Fetching user by barcode %s", barcode);
- jsonObject* params = jsonParseStringFmt("{\"barcode\":\"%s\"}", barcode);
+ jsonObject* params = jsonParseFmt("{\"barcode\":\"%s\"}", barcode);
jsonObject* card = oilsUtilsQuickReq(
"open-ils.cstore", "open-ils.cstore.direct.actor.card.search", params );
jsonObjectFree(params);
double iusr = strtod(usr, NULL);
free(usr);
- params = jsonParseStringFmt("[%f]", iusr);
+ params = jsonParseFmt("[%f]", iusr);
jsonObject* user = oilsUtilsQuickReq(
"open-ils.cstore", "open-ils.cstore.direct.actor.user.retrieve", params);
char* oilsUtilsFetchOrgSetting( int orgid, const char* setting ) {
if(!setting) return NULL;
- jsonObject* params = jsonParseStringFmt("[%d, \"%s\"]", orgid, setting );
+ jsonObject* params = jsonParseFmt("[%d, \"%s\"]", orgid, setting );
jsonObject* set = oilsUtilsQuickReq(
"open-ils.actor",
osrfLogDebug(OSRF_LOG_MARK, "Logging in with username %s", uname );
char* token = NULL;
- jsonObject* params = jsonParseStringFmt("[\"%s\"]", uname);
+ jsonObject* params = jsonParseFmt("[\"%s\"]", uname);
jsonObject* o = oilsUtilsQuickReq(
"open-ils.auth", "open-ils.auth.authenticate.init", params );
jsonObjectFree(params);
free(passhash);
- params = jsonParseStringFmt( "[\"%s\", \"%s\", \"%s\", \"%d\"]", uname, fullhash, type, orgId );
+ params = jsonParseFmt( "[\"%s\", \"%s\", \"%s\", \"%d\"]", uname, fullhash, type, orgId );
o = oilsUtilsQuickReq( "open-ils.auth",
"open-ils.auth.authenticate.complete", params );
jsonObject* oilsUtilsFetchWorkstation( long id ) {
- jsonObject* p = jsonParseStringFmt("[%ld]", id);
+ jsonObject* p = jsonParseFmt("[%ld]", id);
jsonObject* r = oilsUtilsQuickReq(
"open-ils.storage",
"open-ils.storage.direct.actor.workstation.retrieve", p );
}
jsonObject* oilsUtilsFetchWorkstationByName( const char* name ) {
- jsonObject* p = jsonParseStringFmt("{\"name\":\"%s\"}", name);
+ jsonObject* p = jsonParseFmt("{\"name\":\"%s\"}", name);
jsonObject* r = oilsUtilsCStoreReq(
"open-ils.cstore.direct.actor.workstation.search", p);
jsonObjectFree(p);