[Opensrf-commits] r1620 - trunk/src/gateway

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 13 15:33:05 EST 2009


Author: erickson
Date: 2009-01-13 15:33:01 -0500 (Tue, 13 Jan 2009)
New Revision: 1620

Modified:
   trunk/src/gateway/osrf_http_translator.c
Log:
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

Modified: trunk/src/gateway/osrf_http_translator.c
===================================================================
--- trunk/src/gateway/osrf_http_translator.c	2009-01-13 18:07:23 UTC (rev 1619)
+++ trunk/src/gateway/osrf_http_translator.c	2009-01-13 20:33:01 UTC (rev 1620)
@@ -202,7 +202,8 @@
                     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, 



More information about the opensrf-commits mailing list