From a5034f2664181902bc77ebccf906ac01be056151 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 13 Jan 2009 20:33:01 +0000 Subject: [PATCH] need a copy of the service when it's pulled from the cache, since the sessionCache object is freed. use apr_pstrdup so Apache will manage the memory for us git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1620 9efc2488-bf62-4759-914b-345cdb29e865 --- src/gateway/osrf_http_translator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index 184604d..17101dd 100644 --- a/src/gateway/osrf_http_translator.c +++ b/src/gateway/osrf_http_translator.c @@ -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; - trans->service = jsonObjectGetString(jsonObjectGetKey(sessionCache, "service")); + trans->service = apr_pstrdup( + trans->apreq->pool, jsonObjectGetString(jsonObjectGetKey(sessionCache, "service"))); } else { osrfLogError(OSRF_LOG_MARK, -- 2.43.2