Browse Source

[1788] removed the default for 'filetype' from the spec file.

for optional items setting the default doesn't make sense, but we also have
test cases where syntax validation is skipped, so changing it to non-optional
will break existing test cases.  at least for now, it seems to make most sense
to keep it optional and define the default within the parser code.
JINMEI Tatuya 13 years ago
parent
commit
efb79bb638
2 changed files with 1 additions and 3 deletions
  1. 1 2
      src/bin/auth/auth.spec.pre.in
  2. 0 1
      src/bin/auth/auth_config.cc

+ 1 - 2
src/bin/auth/auth.spec.pre.in

@@ -50,8 +50,7 @@
               },
               },
               { "item_name": "filetype",
               { "item_name": "filetype",
                 "item_type": "string",
                 "item_type": "string",
-                "item_optional": true,
-                "item_default": "text"
+                "item_optional": true
               }]
               }]
             }
             }
           }]
           }]

+ 0 - 1
src/bin/auth/auth_config.cc

@@ -165,7 +165,6 @@ MemoryDatasourceConfig::build(ConstElementPtr config_value) {
             isc_throw(AuthConfigError, "Missing zone file for zone: "
             isc_throw(AuthConfigError, "Missing zone file for zone: "
                       << origin_txt);
                       << origin_txt);
         }
         }
-        // XXX: we need to hardcode the default, see above.
         ConstElementPtr filetype = zone_config->get("filetype");
         ConstElementPtr filetype = zone_config->get("filetype");
         const string filetype_txt = filetype ? filetype->stringValue() :
         const string filetype_txt = filetype ? filetype->stringValue() :
             "text";
             "text";