runtime.core_db_pre_trans_execute = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "core-db-post-trans-execute") && !zstr(val)) {
runtime.core_db_post_trans_execute = switch_core_strdup(runtime.memory_pool, val);
+ } else if (!strcasecmp(var, "core-db-inner-pre-trans-execute") && !zstr(val)) {
+ runtime.core_db_inner_pre_trans_execute = switch_core_strdup(runtime.memory_pool, val);
+ } else if (!strcasecmp(var, "core-db-inner-post-trans-execute") && !zstr(val)) {
+ runtime.core_db_inner_post_trans_execute = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "mailer-app") && !zstr(val)) {
runtime.mailer_app = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "mailer-app-args") && val) {
if (!zstr(runtime.core_db_pre_trans_execute)) {
switch_cache_db_execute_sql_real(dbh, runtime.core_db_pre_trans_execute, &errmsg);
if (errmsg) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "SQL PRE TRANS EXEC [%s]\n", errmsg);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "SQL PRE TRANS EXEC %s [%s]\n", runtime.core_db_pre_trans_execute, errmsg);
free(errmsg);
}
}
break;
}
+
+ if (!zstr(runtime.core_db_inner_pre_trans_execute)) {
+ switch_cache_db_execute_sql_real(dbh, runtime.core_db_inner_pre_trans_execute, &errmsg);
+ if (errmsg) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "SQL PRE TRANS EXEC %s [%s]\n", runtime.core_db_inner_pre_trans_execute, errmsg);
+ free(errmsg);
+ }
+ }
+
while (retries > 0) {
switch_cache_db_execute_sql(dbh, sql, &errmsg);
}
}
+ if (!zstr(runtime.core_db_inner_post_trans_execute)) {
+ switch_cache_db_execute_sql_real(dbh, runtime.core_db_inner_post_trans_execute, &errmsg);
+ if (errmsg) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "SQL POST TRANS EXEC %s [%s]\n", runtime.core_db_inner_post_trans_execute, errmsg);
+ free(errmsg);
+ }
+ }
+
done:
if (runtime.odbc_dbtype == DBTYPE_DEFAULT) {
if (!zstr(runtime.core_db_post_trans_execute)) {
switch_cache_db_execute_sql_real(dbh, runtime.core_db_post_trans_execute, &errmsg);
if (errmsg) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "SQL POST TRANS EXEC [%s]\n", errmsg);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "SQL POST TRANS EXEC %s [%s]\n", runtime.core_db_post_trans_execute, errmsg);
free(errmsg);
}
}