Pedantic change for const-correctness: change three calls to
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 14 Aug 2010 21:38:11 +0000 (21:38 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 14 Aug 2010 21:38:11 +0000 (21:38 +0000)
jsonObjectGetKey() to call jsonObjectGetKeyConst() instead.

M    src/gateway/osrf_http_translator.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2004 9efc2488-bf62-4759-914b-345cdb29e865

src/gateway/osrf_http_translator.c

index b1eb619..87bf25d 100644 (file)
@@ -198,8 +198,10 @@ static int osrfHttpTranslatorSetTo(osrfHttpTranslator* trans) {
             sessionCache = osrfCacheGetObject(trans->thread);
 
             if(sessionCache) {
-                const char* ipAddr = jsonObjectGetString(jsonObjectGetKey(sessionCache, "ip"));
-                const char* recipient = jsonObjectGetString(jsonObjectGetKey(sessionCache, "jid"));
+                const char* ipAddr = jsonObjectGetString(
+                    jsonObjectGetKeyConst( sessionCache, "ip" ));
+                const char* recipient = jsonObjectGetString(
+                    jsonObjectGetKeyConst( sessionCache, "jid" ));
 
                 // choosing a specific recipient address requires that the recipient and 
                 // thread be cached on the server (so drone processes cannot be hijacked)
@@ -208,7 +210,8 @@ static int osrfHttpTranslatorSetTo(osrfHttpTranslator* trans) {
                         trans->remoteHost, trans->recipient);
                     stat = 1;
                     trans->service = apr_pstrdup(
-                        trans->apreq->pool, jsonObjectGetString(jsonObjectGetKey(sessionCache, "service")));
+                        trans->apreq->pool, jsonObjectGetString(
+                            jsonObjectGetKeyConst( sessionCache, "service" )));
 
                 } else {
                     osrfLogError(OSRF_LOG_MARK,