提交 a7782dcc authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8185 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 94e7ad44
......@@ -168,8 +168,10 @@ char *expand_alias(char *cmd, char *arg)
char *sql;
char *exp = NULL;
switch_core_db_t *db = switch_core_db_handle();
int full = 0;
sql = switch_mprintf("select command from aliases where alias='%q' or alias='%q %q'", cmd, cmd, arg);
sql = switch_mprintf("select command from aliases where alias='%q'", cmd);
switch_core_db_exec(db, sql, alias_callback, &r, &errmsg);
if (errmsg) {
......@@ -177,8 +179,23 @@ char *expand_alias(char *cmd, char *arg)
free(errmsg);
}
if (!r) {
sql = switch_mprintf("select command from aliases where alias='%q %q'", cmd, arg);
switch_core_db_exec(db, sql, alias_callback, &r, &errmsg);
if (errmsg) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "error [%s][%s]\n", sql, errmsg);
free(errmsg);
}
if (r) {
full++;
}
}
if (r) {
if (arg) {
if (arg && !full) {
exp = switch_mprintf("%s %s", r, arg);
free(r);
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论