diff options
-rw-r--r-- | apps/app_dial.c | 2 | ||||
-rw-r--r-- | apps/app_voicemail.c | 36 | ||||
-rwxr-xr-x | configure | 49 | ||||
-rw-r--r-- | configure.ac | 31 | ||||
-rwxr-xr-x | contrib/scripts/install_prereq | 36 | ||||
-rw-r--r-- | main/astobj2_container.c | 29 | ||||
-rw-r--r-- | main/ccss.c | 17 | ||||
-rw-r--r-- | main/cdr.c | 11 | ||||
-rw-r--r-- | main/channel.c | 12 | ||||
-rw-r--r-- | main/cli.c | 24 | ||||
-rw-r--r-- | main/pbx_app.c | 27 | ||||
-rw-r--r-- | sounds/Makefile | 6 | ||||
-rw-r--r-- | third-party/pjproject/configure.m4 | 2 |
13 files changed, 198 insertions, 84 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 257ff472a..920eb439b 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1605,6 +1605,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, break; } break; + case AST_FRAME_VIDEO: case AST_FRAME_VOICE: case AST_FRAME_IMAGE: if (caller_entertained) { @@ -1703,6 +1704,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, ast_log(LOG_WARNING, "Unable to send URL\n"); } break; + case AST_FRAME_VIDEO: case AST_FRAME_VOICE: case AST_FRAME_IMAGE: if (!single || caller_entertained) { diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 82fa3b341..1ab1169d5 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -7872,7 +7872,8 @@ static int get_folder2(struct ast_channel *chan, char *fn, int start) ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", '#', '#'); return '#'; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", res, res); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(res) ? res : '?', isprint(res) ? res : '?'); return res; } @@ -8035,7 +8036,8 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, if (retries > 3) { cmd = '*'; /* Let's cancel this beast */ } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); } } @@ -8263,7 +8265,8 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st cmd = 't'; done = 1; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); } } if (cmd < 0 || cmd == 't') @@ -8928,7 +8931,8 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc ast_log(AST_LOG_WARNING, "Playback of message %s failed\n", vms->fn); res = 0; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", res, res); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(res) ? res : '?', isprint(res) ? res : '?'); } DISPOSE(vms->curdir, vms->curmsg); return res; @@ -10783,7 +10787,8 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct if (retries > 3) { cmd = 't'; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); } } if (cmd == 't') @@ -10863,7 +10868,8 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st if (retries > 3) { cmd = 't'; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); } } DISPOSE(prefile, -1); @@ -11685,7 +11691,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data) } else { cmd = vm_intro(chan, vmu, &vms); } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); vms.repeats = 0; vms.starting = 1; @@ -11705,7 +11712,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data) adsi_folders(chan, 0, "Change to folder..."); cmd = get_folder2(chan, "vm-changeto", 0); - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); if (cmd == '#') { cmd = 0; } else if (cmd > 0) { @@ -11837,7 +11845,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data) if (vms.repeats > 3) { cmd = 't'; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); } } if (cmd == 't') { @@ -12015,7 +12024,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data) if (useadsi) adsi_folders(chan, 1, "Save to folder..."); cmd = get_folder2(chan, "vm-savefolder", 1); - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); box = 0; /* Shut up compiler */ if (cmd == '#') { cmd = 0; @@ -15181,7 +15191,8 @@ static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, else cmd = 't'; } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", cmd, cmd); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(cmd) ? cmd : '?', isprint(cmd) ? cmd : '?'); } if (retries >= 3) { return 0; @@ -15346,7 +15357,8 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s res = 't'; } } - ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", res, res); + ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", + isprint(res) ? res : '?', isprint(res) ? res : '?'); break; } @@ -7816,6 +7816,9 @@ fi +DOWNLOAD=":" +DOWNLOAD_TO_STDOUT= +DOWNLOAD_TIMEOUT= if test "${WGET}" != ":" ; then DOWNLOAD=${WGET} DOWNLOAD_TO_STDOUT="${WGET} -q -O-" @@ -7866,16 +7869,17 @@ $as_echo "no" >&6; } fi - DOWNLOAD=${FETCH} - DOWNLOAD_TO_STDOUT="${FETCH} -o-" - DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' + if test "${FETCH}" != ":" ; then + DOWNLOAD=${FETCH} + DOWNLOAD_TO_STDOUT="${FETCH} -o-" + DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' + fi fi fi - # Extract the first word of "ldconfig", so it can be a program name with args. set dummy ldconfig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -9204,7 +9208,7 @@ $as_echo_n "checking for embedded pjproject (may have to download)... " >&6; } $as_echo "configuring" >&6; } if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then - as_fn_error $? "A download utility (wget, curl or fetch) is required to download bundled pjproject" "$LINENO" 5 + as_fn_error $? "A download utility (wget, curl, or fetch) is required to download bundled pjproject" "$LINENO" 5 fi if test "${BZIP2}" = ":" ; then as_fn_error $? "bzip2 is required to extract the pjproject tar file" "$LINENO" 5 @@ -19463,6 +19467,41 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=${old_LIBS} +# re-check without -ldl +# Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so. +if test "${PBX_DLADDR}" = "0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in dlfcn.h without -ldl" >&5 +$as_echo_n "checking for dladdr in dlfcn.h without -ldl... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE 1 +#include <dlfcn.h> +int +main () +{ +dladdr((void *)0, (void *)0) + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PBX_DLADDR=1 + + +$as_echo "#define HAVE_DLADDR 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + # PKGCONFIG is used in later tests diff --git a/configure.ac b/configure.ac index 887089219..3151f8995 100644 --- a/configure.ac +++ b/configure.ac @@ -286,6 +286,9 @@ AC_PATH_PROG([PATCH], [patch], :) AC_PATH_PROG([SED], [sed], :) AC_PATH_PROG([NM], [nm], :) +DOWNLOAD=":" +DOWNLOAD_TO_STDOUT= +DOWNLOAD_TIMEOUT= if test "${WGET}" != ":" ; then DOWNLOAD=${WGET} DOWNLOAD_TO_STDOUT="${WGET} -q -O-" @@ -295,13 +298,14 @@ else if test "${CURL}" != ":" ; then DOWNLOAD_TO_STDOUT="${CURL} -Ls" DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)' else - AC_PATH_PROG([FETCH], [fetch], [:]) - DOWNLOAD=${FETCH} - DOWNLOAD_TO_STDOUT="${FETCH} -o-" - DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' + AC_PATH_PROG([FETCH], [fetch], :) + if test "${FETCH}" != ":" ; then + DOWNLOAD=${FETCH} + DOWNLOAD_TO_STDOUT="${FETCH} -o-" + DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' + fi fi fi - AC_SUBST(DOWNLOAD) AC_SUBST(DOWNLOAD_TO_STDOUT) AC_SUBST(DOWNLOAD_TIMEOUT) @@ -1460,6 +1464,23 @@ AC_LINK_IFELSE( ) LIBS=${old_LIBS} +# re-check without -ldl +# Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so. +if test "${PBX_DLADDR}" = "0"; then + AC_MSG_CHECKING(for dladdr in dlfcn.h without -ldl) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#define _GNU_SOURCE 1 +#include <dlfcn.h>], + [dladdr((void *)0, (void *)0)] + )], + AC_MSG_RESULT(yes) + PBX_DLADDR=1 + AC_SUBST([PBX_DLADDR]) + AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]), + AC_MSG_RESULT(no) + ) +fi + # PKGCONFIG is used in later tests PKG_PROG_PKG_CONFIG() diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq index dae8dee68..e588d5cd1 100755 --- a/contrib/scripts/install_prereq +++ b/contrib/scripts/install_prereq @@ -67,6 +67,22 @@ PACKAGES_SUSE="$PACKAGES_SUSE wget subversion" PACKAGES_SUSE="$PACKAGES_SUSE bzip2 patch python-devel" # Basic build system: +PACKAGES_ARCH="make gcc pkg-config" +# Asterisk: basic requirements: +PACKAGES_ARCH="$PACKAGES_ARCH libedit jansson libutil-linux libxml2 sqlite" +# Asterisk: for addons: +PACKAGES_ARCH="$PACKAGES_ARCH speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex" +PACKAGES_ARCH="$PACKAGES_ARCH postgresql-libs unixodbc libtool neon gmime lua uriparser libxslt openssl" +PACKAGES_ARCH="$PACKAGES_ARCH libmariadbclient bluez-libs radcli freetds bash" +PACKAGES_ARCH="$PACKAGES_ARCH net-snmp libnewt popt libical spandsp" +PACKAGES_ARCH="$PACKAGES_ARCH c-client binutils libsrtp gsm doxygen graphviz zlib libldap" +PACKAGES_ARCH="$PACKAGES_ARCH fftw libsndfile unbound" +# Asterisk: for the unpackaged below: +PACKAGES_ARCH="$PACKAGES_ARCH wget subversion" +# Asterisk: for ./configure --with-pjproject-bundled: +PACKAGES_ARCH="$PACKAGES_ARCH bzip2 patch python2" + +# Basic build system: PACKAGES_NBSD="gmake pkg-config" # Asterisk: basic requirements: PACKAGES_NBSD="$PACKAGES_NBSD editline jansson sqlite3 libuuid libxml2" @@ -163,6 +179,15 @@ check_installed_rpms() { done } +check_installed_pacman() { + for pack in "$@" + do + if ! pacman -Q --explicit $pack >/dev/null 2>/dev/null + then echo $pack + fi + done +} + check_installed_pkgs() { for pack in "$@" do @@ -208,6 +233,13 @@ handle_rh() { fi } +handle_arch() { + extra_packs=`check_installed_pacman $PACKAGES_ARCH` + if [ x"$extra_packs" != "x" ] ; then + $testcmd pacman -S --asexplicit --noconfirm $extra_packs + fi +} + handle_nbsd() { extra_packs=`check_installed_pkgs $PACKAGES_NBSD` if [ x"$extra_packs" != "x" ] ; then @@ -334,6 +366,10 @@ elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then handle_SUSE elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "opensuse" ]; then handle_SUSE +elif [ -r /etc/arch-release ]; then + handle_arch +elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID_LIKE" = "archlinux" ]; then + handle_arch # $ID=arch elif [ "$OS" = 'NetBSD' ]; then handle_nbsd elif [ "$OS" = 'OpenBSD' ]; then diff --git a/main/astobj2_container.c b/main/astobj2_container.c index ae647d2dd..9bea58f74 100644 --- a/main/astobj2_container.c +++ b/main/astobj2_container.c @@ -935,12 +935,15 @@ void ao2_container_unregister(const char *name) } #if defined(AO2_DEBUG) -static int ao2_complete_reg_cb(void *obj, void *arg, void *data, int flags) +static int ao2_complete_reg_cb(void *obj, void *arg, int flags) { - struct ao2_reg_match *which = data; + struct ao2_reg_container *reg = obj; - /* ao2_reg_sort_cb() has already filtered the search to matching keys */ - return (which->find_nth < ++which->count) ? (CMP_MATCH | CMP_STOP) : 0; + if (ast_cli_completion_add(ast_strdup(reg->name))) { + return CMP_STOP; + } + + return 0; } #endif /* defined(AO2_DEBUG) */ @@ -948,9 +951,6 @@ static int ao2_complete_reg_cb(void *obj, void *arg, void *data, int flags) static char *complete_container_names(struct ast_cli_args *a) { struct ao2_reg_partial_key partial_key; - struct ao2_reg_match which; - struct ao2_reg_container *reg; - char *name; if (a->pos != 3) { return NULL; @@ -958,17 +958,10 @@ static char *complete_container_names(struct ast_cli_args *a) partial_key.len = strlen(a->word); partial_key.name = a->word; - which.find_nth = a->n; - which.count = 0; - reg = ao2_t_callback_data(reg_containers, partial_key.len ? OBJ_SEARCH_PARTIAL_KEY : 0, - ao2_complete_reg_cb, &partial_key, &which, "Find partial registered container"); - if (reg) { - name = ast_strdup(reg->name); - ao2_t_ref(reg, -1, "Done with registered container object."); - } else { - name = NULL; - } - return name; + ao2_callback(reg_containers, partial_key.len ? OBJ_SEARCH_PARTIAL_KEY : 0, + ao2_complete_reg_cb, &partial_key); + + return NULL; } #endif /* defined(AO2_DEBUG) */ diff --git a/main/ccss.c b/main/ccss.c index ed0bba7f5..fa569aaa0 100644 --- a/main/ccss.c +++ b/main/ccss.c @@ -4547,11 +4547,9 @@ static int kill_cores(void *obj, void *arg, int flags) return 0; } -static char *complete_core_id(const char *line, const char *word, int pos, int state) +static char *complete_core_id(const char *word) { - int which = 0; int wordlen = strlen(word); - char *ret = NULL; struct ao2_iterator core_iter = ao2_iterator_init(cc_core_instances, 0); struct cc_core_instance *core_instance; @@ -4559,15 +4557,16 @@ static char *complete_core_id(const char *line, const char *word, int pos, int s cc_unref(core_instance, "CLI tab completion iteration")) { char core_id_str[20]; snprintf(core_id_str, sizeof(core_id_str), "%d", core_instance->core_id); - if (!strncmp(word, core_id_str, wordlen) && ++which > state) { - ret = ast_strdup(core_id_str); - cc_unref(core_instance, "Found a matching core ID for CLI tab-completion"); - break; + if (!strncmp(word, core_id_str, wordlen)) { + if (ast_cli_completion_add(ast_strdup(core_id_str))) { + cc_unref(core_instance, "Found a matching core ID for CLI tab-completion"); + break; + } } } ao2_iterator_destroy(&core_iter); - return ret; + return NULL; } static char *handle_cc_kill(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) @@ -4583,7 +4582,7 @@ static char *handle_cc_kill(struct ast_cli_entry *e, int cmd, struct ast_cli_arg return NULL; case CLI_GENERATE: if (a->pos == 3 && !strcasecmp(a->argv[2], "core")) { - return complete_core_id(a->line, a->word, a->pos, a->n); + return complete_core_id(a->word); } return NULL; } diff --git a/main/cdr.c b/main/cdr.c index 4acadf975..b0a48e1d6 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -3950,18 +3950,14 @@ static char *handle_cli_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_a /*! \brief Complete user input for 'cdr show' */ static char *cli_complete_show(struct ast_cli_args *a) { - char *result = NULL; int wordlen = strlen(a->word); - int which = 0; struct ao2_iterator it_cdrs; struct cdr_object *cdr; it_cdrs = ao2_iterator_init(active_cdrs_master, 0); while ((cdr = ao2_iterator_next(&it_cdrs))) { - if (!strncasecmp(a->word, cdr->party_a.snapshot->name, wordlen) && - (++which > a->n)) { - result = ast_strdup(cdr->party_a.snapshot->name); - if (result) { + if (!strncasecmp(a->word, cdr->party_a.snapshot->name, wordlen)) { + if (ast_cli_completion_add(ast_strdup(cdr->party_a.snapshot->name))) { ao2_ref(cdr, -1); break; } @@ -3969,7 +3965,8 @@ static char *cli_complete_show(struct ast_cli_args *a) ao2_ref(cdr, -1); } ao2_iterator_destroy(&it_cdrs); - return result; + + return NULL; } static void cli_show_channels(struct ast_cli_args *a) diff --git a/main/channel.c b/main/channel.c index 2779aa827..304fae18a 100644 --- a/main/channel.c +++ b/main/channel.c @@ -304,25 +304,23 @@ static char *handle_cli_core_show_channeltypes(struct ast_cli_entry *e, int cmd, static char *complete_channeltypes(struct ast_cli_args *a) { struct chanlist *cl; - int which = 0; int wordlen; - char *ret = NULL; - if (a->pos != 3) + if (a->pos != 3) { return NULL; + } wordlen = strlen(a->word); AST_RWLIST_RDLOCK(&backends); AST_RWLIST_TRAVERSE(&backends, cl, list) { - if (!strncasecmp(a->word, cl->tech->type, wordlen) && ++which > a->n) { - ret = ast_strdup(cl->tech->type); - break; + if (!strncasecmp(a->word, cl->tech->type, wordlen)) { + ast_cli_completion_add(ast_strdup(cl->tech->type)); } } AST_RWLIST_UNLOCK(&backends); - return ret; + return NULL; } /*! \brief Show details about a channel driver - CLI command */ diff --git a/main/cli.c b/main/cli.c index 80c184328..e46d3427c 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1655,8 +1655,15 @@ char *ast_cli_complete(const char *word, const char * const choices[], int state len = ast_strlen_zero(word) ? 0 : strlen(word); for (i = 0; choices[i]; i++) { - if ((!len || !strncasecmp(word, choices[i], len)) && ++which > state) - return ast_strdup(choices[i]); + if ((!len || !strncasecmp(word, choices[i], len)) && ++which > state) { + if (state != -1) { + return ast_strdup(choices[i]); + } + + if (ast_cli_completion_add(ast_strdup(choices[i]))) { + return NULL; + } + } } return NULL; } @@ -1682,9 +1689,16 @@ char *ast_complete_channels(const char *line, const char *word, int pos, int sta struct ast_channel_snapshot *snapshot = stasis_message_data(msg); if (!strncasecmp(word, snapshot->name, wordlen) && (++which > state)) { - ret = ast_strdup(snapshot->name); - ao2_ref(msg, -1); - break; + if (state != -1) { + ret = ast_strdup(snapshot->name); + ao2_ref(msg, -1); + break; + } + + if (ast_cli_completion_add(ast_strdup(snapshot->name))) { + ao2_ref(msg, -1); + break; + } } } ao2_iterator_destroy(&iter); diff --git a/main/pbx_app.c b/main/pbx_app.c index ec6bc7589..df8126c7f 100644 --- a/main/pbx_app.c +++ b/main/pbx_app.c @@ -275,7 +275,7 @@ static char *handle_show_application(struct ast_cli_entry *e, int cmd, struct as * application at one time. You can type 'show application Dial Echo' and * you will see informations about these two applications ... */ - return ast_complete_applications(a->line, a->word, a->n); + return ast_complete_applications(a->line, a->word, -1); } if (a->argc < 4) { @@ -437,20 +437,23 @@ char *ast_complete_applications(const char *line, const char *word, int state) AST_RWLIST_RDLOCK(&apps); AST_RWLIST_TRAVERSE(&apps, app, list) { cmp = strncasecmp(word, app->name, wordlen); - if (cmp > 0) { - continue; - } - if (!cmp) { + if (cmp < 0) { + /* No more matches. */ + break; + } else if (!cmp) { /* Found match. */ - if (++which <= state) { - /* Not enough matches. */ - continue; + if (state != -1) { + if (++which <= state) { + /* Not enough matches. */ + continue; + } + ret = ast_strdup(app->name); + break; + } + if (ast_cli_completion_add(ast_strdup(app->name))) { + break; } - ret = ast_strdup(app->name); - break; } - /* Not in container. */ - break; } AST_RWLIST_UNLOCK(&apps); diff --git a/sounds/Makefile b/sounds/Makefile index 779d52a8e..606bbdcec 100644 --- a/sounds/Makefile +++ b/sounds/Makefile @@ -127,9 +127,9 @@ have_download: @if test "$(DOWNLOAD)" = ":" ; then \ echo "**************************************************"; \ echo "*** ***"; \ - echo "*** You must have either wget or fetch to be ***"; \ - echo "*** able to automatically download and install ***"; \ - echo "*** the requested sound packages. ***"; \ + echo "*** You must have either wget, curl, or fetch ***"; \ + echo "*** to be able to automatically download and ***"; \ + echo "*** install the requested sound packages. ***"; \ echo "*** ***"; \ echo "*** Please install one of these, or remove any ***"; \ echo "*** extra sound package selections in ***"; \ diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4 index c1edaf9aa..42482b2e5 100644 --- a/third-party/pjproject/configure.m4 +++ b/third-party/pjproject/configure.m4 @@ -16,7 +16,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE], AC_MSG_RESULT(configuring) if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then - AC_MSG_ERROR(A download utility (wget, curl or fetch) is required to download bundled pjproject) + AC_MSG_ERROR(A download utility (wget, curl, or fetch) is required to download bundled pjproject) fi if test "${BZIP2}" = ":" ; then AC_MSG_ERROR(bzip2 is required to extract the pjproject tar file) |