mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
avoid loop and adding a missing complete
This commit is contained in:
parent
dd67bd41f9
commit
46f5055914
@ -34,7 +34,7 @@
|
|||||||
* Rupa Schomaker <rupa@rupa.com>
|
* Rupa Schomaker <rupa@rupa.com>
|
||||||
* Joseph Sullivan <jossulli@amazon.com>
|
* Joseph Sullivan <jossulli@amazon.com>
|
||||||
* Raymond Chandler <intralanman@freeswitch.org>
|
* Raymond Chandler <intralanman@freeswitch.org>
|
||||||
*
|
* Seven Du <dujinfang@gmail.com>
|
||||||
* Garmt Boekholt <garmt@cimico.com>
|
* Garmt Boekholt <garmt@cimico.com>
|
||||||
*
|
*
|
||||||
* mod_commands.c -- Misc. Command Module
|
* mod_commands.c -- Misc. Command Module
|
||||||
@ -6532,6 +6532,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
|
|||||||
|
|
||||||
|
|
||||||
switch_console_set_complete("add alias add");
|
switch_console_set_complete("add alias add");
|
||||||
|
switch_console_set_complete("add alias stickyadd");
|
||||||
switch_console_set_complete("add alias del");
|
switch_console_set_complete("add alias del");
|
||||||
switch_console_set_complete("add coalesce");
|
switch_console_set_complete("add coalesce");
|
||||||
switch_console_set_complete("add complete add");
|
switch_console_set_complete("add complete add");
|
||||||
|
@ -1921,6 +1921,11 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string)
|
|||||||
switch_cache_db_handle_t *db = NULL;
|
switch_cache_db_handle_t *db = NULL;
|
||||||
char *sql = 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) {
|
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Database Error\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Database Error\n");
|
||||||
free(mydata);
|
free(mydata);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user