-// If we ever decide we need to be able to specify multiple settings directories,
-// the two calls to read_settings must be split -- so the dictionary is prepared
-// for the contents of every directory before the databases are updated.
-void settings_read(const char *path)
+// Read any settings names introduced in service definition (config) and add to dictionary
+// This is done now to avoid errors if user settings are declared in session overrides
+static void initialize_soft_settings(struct conf_service *service)
+{
+ int i;
+
+ for (i = 0; i < service->num_metadata; i++)
+ {
+ struct conf_metadata *md = &service->metadata[i];
+
+ if (md->setting == Metadata_setting_no)
+ continue;
+
+ settings_create_offset(service, md->name);
+ }
+}
+
+static void prepare_target_dictionary(void *client_data, struct setting *set)
+{
+ struct conf_service *service = (struct conf_service *) client_data;
+
+ // If target address is not wildcard, add the database
+ if (*set->target && !zurl_wildcard(set->target))
+ create_database_for_service(set->target, service);
+}
+
+void init_settings(struct conf_service *service)