[Opensrf-commits] r2004 - trunk/src/gateway (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Aug 14 17:38:17 EDT 2010
Author: scottmk
Date: 2010-08-14 17:38:11 -0400 (Sat, 14 Aug 2010)
New Revision: 2004
Modified:
trunk/src/gateway/osrf_http_translator.c
Log:
Pedantic change for const-correctness: change three calls to
jsonObjectGetKey() to call jsonObjectGetKeyConst() instead.
M src/gateway/osrf_http_translator.c
Modified: trunk/src/gateway/osrf_http_translator.c
===================================================================
--- trunk/src/gateway/osrf_http_translator.c 2010-08-14 21:14:55 UTC (rev 2003)
+++ trunk/src/gateway/osrf_http_translator.c 2010-08-14 21:38:11 UTC (rev 2004)
@@ -198,8 +198,10 @@
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 @@
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,
More information about the opensrf-commits
mailing list