diff options
-rw-r--r-- | apps/app_dial.c | 2 | ||||
-rw-r--r-- | apps/app_voicemail.c | 36 | ||||
-rwxr-xr-x | configure | 35 | ||||
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | main/cdr.c | 11 |
5 files changed, 82 insertions, 19 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; } @@ -19467,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 b76fba1c3..fbd6aab33 100644 --- a/configure.ac +++ b/configure.ac @@ -1464,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/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) |