[open-ils-commits] r8177 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Dec 8 23:00:18 EST 2007
Author: miker
Date: 2007-12-08 22:40:09 -0500 (Sat, 08 Dec 2007)
New Revision: 8177
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
going back to jsonParseString ... something is still making json_query unhappy
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2007-12-09 03:18:28 UTC (rev 8176)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2007-12-09 03:40:09 UTC (rev 8177)
@@ -1895,6 +1895,7 @@
sel_pos++;
}
+
jsonObjectIteratorFree(select_itr);
}
@@ -1978,9 +1979,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 ))
@@ -2037,9 +2038,11 @@
}
}
+ 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 );
@@ -2057,6 +2060,7 @@
free(_f);
}
+ jsonObjectIteratorFree(order_itr);
// IT'S THE OOOOOOOOOOOLD STYLE!
@@ -2075,13 +2079,10 @@
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);
@@ -3047,7 +3048,7 @@
static jsonObject* oilsMakeFieldmapperFromResult( dbi_result result, osrfHash* meta) {
if(!(result && meta)) return jsonNULL;
- jsonObject* object = jsonNewObject(NULL);
+ jsonObject* object = jsonParseString("[]");
jsonObjectSetClass(object, osrfHashGet(meta, "classname"));
osrfHash* fields = osrfHashGet(meta, "fields");
@@ -3157,7 +3158,7 @@
static jsonObject* oilsMakeJSONFromResult( dbi_result result ) {
if(!result) return jsonNULL;
- jsonObject* object = jsonNewObject(NULL);
+ jsonObject* object = jsonParseString("{}");
time_t _tmp_dt;
char dt_string[256];
More information about the open-ils-commits
mailing list