From: erickson Date: Tue, 13 Jan 2009 20:33:32 +0000 (+0000) Subject: need a copy of the service when it's pulled from the cache, since the sessionCache... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f085903a5ca3d81eafbaa21c3ac77a239ad3ead5;p=OpenSRF.git 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/branches/rel_1_0@1621 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index b26d2ed..97f3a25 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,