always attach the permission list, even if it is empty; attach the constructed foreig...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 14 Dec 2008 21:41:22 +0000 (21:41 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 14 Dec 2008 21:41:22 +0000 (21:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11546 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_idl-core.c

index c756356..d402969 100644 (file)
@@ -335,8 +335,8 @@ osrfHash* oilsIDLInit( const char* idl_filename ) {
                                                                        }
                                                                }
                                                                free(map_list);
-                                                               osrfHashSet( _tmp, map, "permission");
                                                        }
+                                                       osrfHashSet( _tmp, map, "permission");
 
                                                osrfHashSet( _tmp, (char*)xmlGetProp(_l, BAD_CAST "global_required"), "global_required");
 
@@ -359,6 +359,9 @@ osrfHash* oilsIDLInit( const char* idl_filename ) {
                                                        }
                                                        osrfHashSet( _tmp, map, "local_context");
 
+                                                       osrfHash* foreign_context = osrfNewHash();
+                                                       osrfHashSet( _tmp, foreign_context, "foreign_context");
+
                                                        xmlNodePtr _f = _l->children;
 
                                                        while(_f) {
@@ -371,11 +374,11 @@ osrfHash* oilsIDLInit( const char* idl_filename ) {
                                                                if( (string_tmp = (char*)xmlGetProp(_f, BAD_CAST "link")) ) {
                                                                        osrfLogDebug(OSRF_LOG_MARK, "Permacrud context link definition is %s", string_tmp );
 
-                                                                       osrfHash* _tmp_fcontext = osrfNewHash();
                                                                        osrfHash* _flink = oilsIDLFindPath("/%s/links/%s", osrfHashGet(usrData, "classname"), string_tmp);
 
-                                                                       osrfHashSet( _tmp_fcontext, osrfNewHash(), osrfHashGet(_flink, "class") );
-                                                                       _tmp_fcontext = osrfHashGet( _tmp_fcontext, osrfHashGet(_flink, "class") );
+                                                                       osrfHashSet( foreign_context, osrfNewHash(), osrfHashGet(_flink, "class") );
+                                                                       osrfHash* _tmp_fcontext = osrfHashGet( foreign_context, osrfHashGet(_flink, "class") );
+
                                                                        osrfHashSet( _tmp_fcontext, osrfHashGet(_flink, "field"), "fkey" );
                                                                        osrfHashSet( _tmp_fcontext, osrfHashGet(_flink, "key"), "field" );