From: scottmk Date: Sat, 14 Aug 2010 21:38:11 +0000 (+0000) Subject: Pedantic change for const-correctness: change three calls to X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b045caec069a7d9840dfb4760bee6b3eec688076;p=opensrf%2Fbjwebb.git Pedantic change for const-correctness: change three calls to 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 --- diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index b1eb619..87bf25d 100644 --- a/src/gateway/osrf_http_translator.c +++ b/src/gateway/osrf_http_translator.c @@ -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,