Pedantic change for const-correctness: changed three calls to
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 14 Aug 2010 21:55:50 +0000 (21:55 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 14 Aug 2010 21:55:50 +0000 (21:55 +0000)
jsonObjectGetKey() to call jsonObjectGetKeyConst() instead.

M    Open-ILS/src/c-apps/oils_utils.c

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17220 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_utils.c

index 07bf9f2..2be8420 100644 (file)
@@ -305,7 +305,7 @@ char* oilsUtilsFetchOrgSetting( int orgid, const char* setting ) {
                "open-ils.actor",
                "open-ils.actor.ou_setting.ancestor_default", params);
 
-       char* value = jsonObjectToSimpleString(jsonObjectGetKey(set, "value"));
+       char* value = jsonObjectToSimpleString( jsonObjectGetKeyConst( set, "value" ));
        jsonObjectFree(params);
        jsonObjectFree(set);
        osrfLogDebug(OSRF_LOG_MARK, "Fetched org [%d] setting: %s => %s", orgid, setting, value);
@@ -341,7 +341,7 @@ char* oilsUtilsLogin( const char* uname, const char* passwd, const char* type, i
 
        if(o) {
                const char* tok = jsonObjectGetString(
-                       jsonObjectGetKey(jsonObjectGetKey(o,"payload"), "authtoken"));
+                       jsonObjectGetKeyConst( jsonObjectGetKey( o,"payload" ), "authtoken" ));
                if( tok )
                        token = strdup( tok );
        }
@@ -439,7 +439,7 @@ long oilsUtilsIntervalToSeconds( const char* s ) {
        jsonObjectFree( query_obj );
 
        // Get the results
-       jsonObject* seconds_obj = jsonObjectGetKey( result, "config.interval_to_seconds" );
+       const jsonObject* seconds_obj = jsonObjectGetKeyConst( result, "config.interval_to_seconds" );
        long seconds = -1;
        if( seconds_obj && JSON_NUMBER == seconds_obj->type )
                seconds = (long) jsonObjectGetNumber( seconds_obj );