From b045caec069a7d9840dfb4760bee6b3eec688076 Mon Sep 17 00:00:00 2001 From: scottmk Date: Sat, 14 Aug 2010 21:38:11 +0000 Subject: [PATCH] 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 --- src/gateway/osrf_http_translator.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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, -- 2.43.2