[Opensrf-commits] r1621 - branches/rel_1_0/src/gateway

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


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

Modified:
   branches/rel_1_0/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: branches/rel_1_0/src/gateway/osrf_http_translator.c
===================================================================
--- branches/rel_1_0/src/gateway/osrf_http_translator.c	2009-01-13 20:33:01 UTC (rev 1620)
+++ branches/rel_1_0/src/gateway/osrf_http_translator.c	2009-01-13 20:33:32 UTC (rev 1621)
@@ -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