[open-ils-commits] r8176 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Dec 8 22:38:36 EST 2007
Author: miker
Date: 2007-12-08 22:18:28 -0500 (Sat, 08 Dec 2007)
New Revision: 8176
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
moving around itr definitions ... something has made json_query unhappy recently
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2007-12-09 02:50:54 UTC (rev 8175)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2007-12-09 03:18:28 UTC (rev 8176)
@@ -1978,9 +1978,9 @@
if (!jsonObjectGetKeyConst(selhash,snode->key))
continue;
+ jsonObjectIterator* order_itr = jsonNewObjectIterator( snode->item );
if ( snode->item->type == JSON_HASH ) {
- jsonObjectIterator* order_itr = jsonNewObjectIterator( snode->item );
while ( (onode = jsonObjectIteratorNext( order_itr )) ) {
if (!oilsIDLFindPath( "/%s/fields/%s", snode->key, onode->key ))
@@ -2038,11 +2038,8 @@
}
- jsonObjectIteratorFree(order_itr);
-
} else if ( snode->item->type == JSON_ARRAY ) {
- jsonObjectIterator* order_itr = jsonNewObjectIterator( snode->item );
while ( (onode = jsonObjectIteratorNext( order_itr )) ) {
char* _f = jsonObjectToSimpleString( onode->item );
@@ -2061,7 +2058,6 @@
}
- jsonObjectIteratorFree(order_itr);
// IT'S THE OOOOOOOOOOOLD STYLE!
} else {
@@ -2079,10 +2075,13 @@
buffer_free(group_buf);
buffer_free(order_buf);
buffer_free(sql_buf);
+ jsonObjectIteratorFree(order_itr);
if (defaultselhash) jsonObjectFree(defaultselhash);
return NULL;
}
+ jsonObjectIteratorFree(order_itr);
+
}
jsonObjectIteratorFree(class_itr);
More information about the open-ils-commits
mailing list