need a copy of the service when it's pulled from the cache, since the sessionCache...
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 13 Jan 2009 20:33:01 +0000 (20:33 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 13 Jan 2009 20:33:01 +0000 (20:33 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1620 9efc2488-bf62-4759-914b-345cdb29e865

src/gateway/osrf_http_translator.c

index 184604d..17101dd 100644 (file)
@@ -202,7 +202,8 @@ static int osrfHttpTranslatorSetTo(osrfHttpTranslator* trans) {
                     osrfLogDebug(OSRF_LOG_MARK, "Found cached session from host %s and recipient %s", 
                         trans->remoteHost, trans->recipient);
                     stat = 1;
                     osrfLogDebug(OSRF_LOG_MARK, "Found cached session from host %s and recipient %s", 
                         trans->remoteHost, trans->recipient);
                     stat = 1;
-                    trans->service = jsonObjectGetString(jsonObjectGetKey(sessionCache, "service"));
+                    trans->service = apr_pstrdup(
+                        trans->apreq->pool, jsonObjectGetString(jsonObjectGetKey(sessionCache, "service")));
 
                 } else {
                     osrfLogError(OSRF_LOG_MARK, 
 
                 } else {
                     osrfLogError(OSRF_LOG_MARK,