[open-ils-commits] r13049 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon May 4 10:17:13 EDT 2009
Author: scottmk
Date: 2009-05-04 10:17:11 -0400 (Mon, 04 May 2009)
New Revision: 13049
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
To plug a memory leak: uncommented a call to jsonObjectIteratorFree().
This call was allegedly causing abends at some point in the past,
but my testing reveals no problems with it now.
Also: eliminated a couple of calls to oilsIDLFindPath().
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-05-04 13:52:12 UTC (rev 13048)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-05-04 14:17:11 UTC (rev 13049)
@@ -3621,7 +3621,7 @@
if ( jsonObjectGetKeyConst( onode, "transform" ) ) {
string = searchFieldTransform(
class_itr->key,
- oilsIDLFindPath( "/%s/fields/%s", class_itr->key, order_itr->key ),
+ osrfHashGet( field_list_def, order_itr->key ),
onode
);
if( ! string ) {
@@ -3702,7 +3702,7 @@
}
} // end while
- // jsonIteratorFree(order_itr);
+ jsonIteratorFree(order_itr);
} else if ( snode->type == JSON_ARRAY ) {
@@ -4021,17 +4021,15 @@
jsonIterator* order_itr = jsonNewIterator( snode );
while ( (onode = jsonIteratorNext( order_itr )) ) {
- if (!oilsIDLFindPath( "/%s/fields/%s", class_itr->key, order_itr->key ))
+ osrfHash* field_def = oilsIDLFindPath( "/%s/fields/%s",
+ class_itr->key, order_itr->key );
+ if ( !field_def )
continue;
char* direction = NULL;
if ( onode->type == JSON_HASH ) {
if ( jsonObjectGetKeyConst( onode, "transform" ) ) {
- string = searchFieldTransform(
- class_itr->key,
- oilsIDLFindPath( "/%s/fields/%s", class_itr->key, order_itr->key ),
- onode
- );
+ string = searchFieldTransform( class_itr->key, field_def, onode );
if( ! string ) {
osrfAppSessionStatus(
ctx->session,
More information about the open-ils-commits
mailing list