slowly adding back the iterator cleanup
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 9 Dec 2007 04:44:45 +0000 (04:44 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 9 Dec 2007 04:44:45 +0000 (04:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8179 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_cstore.c

index 64fcb01..84bcc36 100644 (file)
@@ -1322,7 +1322,7 @@ static char* searchPredicate ( const char* class, osrfHash* field, jsonObject* n
 
                        break;
                }
-        // jsonObjectIteratorFree(pred_itr);
+        jsonObjectIteratorFree(pred_itr);
        } else if (node->type == JSON_NULL) { // IS NULL search
                growing_buffer* _p = buffer_init(64);
                buffer_fadd(
@@ -1532,7 +1532,7 @@ static char* searchJOIN ( const jsonObject* join_hash, osrfHash* leftmeta ) {
                free(field);
        }
 
-    // jsonObjectIteratorFree(search_itr);
+    jsonObjectIteratorFree(search_itr);
 
        return buffer_release(join_buf);
 }
@@ -2234,10 +2234,10 @@ static char* buildSELECT ( jsonObject* search_hash, jsonObject* order_hash, osrf
             }
                }
 
-        // jsonObjectIteratorFree(select_itr);
+        jsonObjectIteratorFree(select_itr);
        }
 
-    // jsonObjectIteratorFree(class_itr);
+    jsonObjectIteratorFree(class_itr);
 
        char* col_list = buffer_release(select_buf);
        char* table = getSourceDefinition(meta);
@@ -2347,7 +2347,7 @@ static char* buildSELECT ( jsonObject* search_hash, jsonObject* order_hash, osrf
 
                                        }
 
-                    // jsonObjectIteratorFree(order_itr);
+                    jsonObjectIteratorFree(order_itr);
 
                                } else {
                                        string = jsonObjectToSimpleString(snode->item);
@@ -2358,7 +2358,7 @@ static char* buildSELECT ( jsonObject* search_hash, jsonObject* order_hash, osrf
 
                        }
 
-            // jsonObjectIteratorFree(class_itr);
+            jsonObjectIteratorFree(class_itr);
 
                        string = buffer_release(order_buf);
 
@@ -2576,7 +2576,7 @@ static jsonObject* doFieldmapperSearch ( osrfMethodContext* ctx, osrfHash* meta,
                                                while ((_f = jsonObjectIteratorNext( _i ))) {
                                                        osrfStringArrayAdd( link_fields, jsonObjectToSimpleString( _f->item ) );
                                                }
-                        // jsonObjectIteratorFree(_i);
+                        jsonObjectIteratorFree(_i);
                                        }
                                }
 
@@ -3048,7 +3048,7 @@ static jsonObject* doDelete(osrfMethodContext* ctx, int* err ) {
 static jsonObject* oilsMakeFieldmapperFromResult( dbi_result result, osrfHash* meta) {
        if(!(result && meta)) return jsonNULL;
 
-       jsonObject* object = jsonParseString("[]");
+       jsonObject* object = jsonNewObject(NULL);
        jsonObjectSetClass(object, osrfHashGet(meta, "classname"));
 
        osrfHash* fields = osrfHashGet(meta, "fields");
@@ -3158,7 +3158,7 @@ static jsonObject* oilsMakeFieldmapperFromResult( dbi_result result, osrfHash* m
 static jsonObject* oilsMakeJSONFromResult( dbi_result result ) {
        if(!result) return jsonNULL;
 
-       jsonObject* object = jsonParseString("{}");
+       jsonObject* object = jsonNewObject(NULL);
 
        time_t _tmp_dt;
        char dt_string[256];