[open-ils-commits] r11610 - branches/rel_1_2_3/Open-ILS/src/c-apps

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Dec 17 15:39:05 EST 2008


Author: miker
Date: 2008-12-17 15:39:01 -0500 (Wed, 17 Dec 2008)
New Revision: 11610

Modified:
   branches/rel_1_2_3/Open-ILS/src/c-apps/oils_cstore.c
Log:
clone the object instead of serializing and then parsing

Modified: branches/rel_1_2_3/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- branches/rel_1_2_3/Open-ILS/src/c-apps/oils_cstore.c	2008-12-17 20:38:23 UTC (rev 11609)
+++ branches/rel_1_2_3/Open-ILS/src/c-apps/oils_cstore.c	2008-12-17 20:39:01 UTC (rev 11610)
@@ -925,6 +925,7 @@
 		osrfHashGet(meta, "fieldmapper"),
 		id
 	);
+	free(id);
 
 	jsonObject* fake_params = jsonParseString("[]");
 	jsonObjectPush(fake_params, jsonParseString("{}"));
@@ -932,7 +933,7 @@
 	jsonObjectSetKey(
 		jsonObjectGetIndex(fake_params, 0),
 		osrfHashGet(meta, "primarykey"),
-		jsonParseString(id)
+		jsonObjectClone(jsonObjectGetIndex(ctx->params, 0))
 	);
 
 	if (order_hash) jsonObjectPush(fake_params, jsonObjectClone(order_hash) );



More information about the open-ils-commits mailing list