avoid loop and adding a missing complete

This commit is contained in:
Seven Du committed 2013-11-18 15:11:21 +08:00
1 parent dd67bd41f9
commit 46f5055914
2 files changed
+7 -1

No files matched your search

+5
View File
@@ -1921,6 +1921,11 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string)
switch_cache_db_handle_t *db = NULL;
char *sql = NULL;
if (!strcmp(argv[1], argv[2])) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Alias and command cannot be the same, this will cause loop!\n");
return SWITCH_STATUS_FALSE;
}
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Database Error\n");
free(mydata);