count = switch_event_import_xml(switch_xml_child(x_settings, "param"), "name", "value", &event);
// status = switch_xml_config_parse_event(event, count, reload, instructions);
- /* TODO: Initialize stack configuration */
+ /* TODO: Kapil: Initialize stack configuration */
+ status = SWITCH_STATUS_SUCCESS;
}
done:
switch_thread_rwlock_create(&profile->rwlock, pool);
/* TODO: Kapil: Insert stack per-interface startup code here */
+ if (config_profile(profile, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error configuring profile %s\n", profile->name);
+ goto fail;
+ }
switch_core_hash_insert_wrlock(megaco_globals.profile_hash, profile->name, profile, megaco_globals.profile_rwlock);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Started profile: %s\n", profile->name);
return SWITCH_STATUS_SUCCESS;
+
fail:
switch_core_destroy_memory_pool(&pool);
return SWITCH_STATUS_FALSE;