summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/app_queue.c4
-rwxr-xr-xbootstrap.sh2
-rw-r--r--channels/chan_dahdi.c4
-rw-r--r--channels/chan_sip.c54
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
-rwxr-xr-xcontrib/scripts/autosupport4
-rw-r--r--res/res_sorcery_memory_cache.c2
8 files changed, 38 insertions, 36 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 0abd512fa..9176f9360 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2351,6 +2351,7 @@ static int pending_members_cmp(void *obj, void *arg, int flags)
static void pending_members_remove(struct member *mem)
{
+ ast_debug(3, "Removed %s from pending_members\n", mem->membername);
ao2_find(pending_members, mem, OBJ_POINTER | OBJ_NODATA | OBJ_UNLINK);
}
@@ -4207,6 +4208,7 @@ static void do_hang(struct callattempt *o)
{
o->stillgoing = 0;
ast_hangup(o->chan);
+ pending_members_remove(o->member);
o->chan = NULL;
}
@@ -4287,6 +4289,7 @@ static int can_ring_entry(struct queue_ent *qe, struct callattempt *call)
* If not found add it to the container so another queue
* won't attempt to call this member at the same time.
*/
+ ast_debug(3, "Add %s to pending_members\n", call->member->membername);
ao2_link(pending_members, call->member);
ao2_unlock(pending_members);
@@ -4422,7 +4425,6 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies
/* Again, keep going even if there's an error */
ast_verb(3, "Couldn't call %s\n", tmp->interface);
do_hang(tmp);
- pending_members_remove(tmp->member);
++*busies;
return 0;
}
diff --git a/bootstrap.sh b/bootstrap.sh
index 051ee3e82..272c57b94 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -46,7 +46,7 @@ check_for_app aclocal${MY_AM_VER}
echo "Generating the configure script ..."
-aclocal${MY_AM_VER} -I autoconf `find third-party/ -maxdepth 1 -type d -printf "-I %p "`
+aclocal${MY_AM_VER} -I autoconf `find third-party -maxdepth 1 -type d | xargs -I {} echo -I {}`
autoconf${MY_AC_VER}
autoheader${MY_AC_VER}
automake${MY_AM_VER} --add-missing --copy 2>/dev/null
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index d224a2044..97c80c83e 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -18826,8 +18826,8 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
}
/* This check is only needed to satisfy the compiler that element_count can't cause an out of bounds */
- if (element_count >= ARRAY_LEN(c)) {
- element_count = ARRAY_LEN(c) - 1;
+ if (element_count > ARRAY_LEN(c)) {
+ element_count = ARRAY_LEN(c);
}
/* Ring cadences cannot be negative */
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index aa0d6a5dd..af17a386f 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1780,7 +1780,7 @@ static void destroy_escs(void)
{
int i;
for (i = 0; i < ARRAY_LEN(event_state_compositors); i++) {
- ao2_cleanup(event_state_compositors[i].compositor);
+ ao2_replace(event_state_compositors[i].compositor, NULL);
}
}
@@ -35365,6 +35365,8 @@ static int unload_module(void)
struct ao2_iterator i;
struct timeval start;
+ ast_sched_dump(sched);
+
ast_sip_api_provider_unregister();
if (sip_cfg.websocket_enabled) {
@@ -35374,12 +35376,11 @@ static int unload_module(void)
network_change_stasis_unsubscribe();
acl_change_event_stasis_unsubscribe();
- ast_sched_dump(sched);
-
/* First, take us out of the channel type list */
ast_channel_unregister(&sip_tech);
-
ast_msg_tech_unregister(&sip_msg_tech);
+ ast_cc_monitor_unregister(&sip_cc_monitor_callbacks);
+ ast_cc_agent_unregister(&sip_cc_agent_callbacks);
/* Unregister dial plan functions */
ast_custom_function_unregister(&sippeer_function);
@@ -35443,8 +35444,6 @@ static int unload_module(void)
}
ao2_iterator_destroy(&i);
- unlink_all_peers_from_tables();
-
ast_mutex_lock(&monlock);
if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP) && (monitor_thread != AST_PTHREADT_NULL)) {
pthread_t th = monitor_thread;
@@ -35458,7 +35457,12 @@ static int unload_module(void)
ast_mutex_unlock(&monlock);
}
+ /* Clear containers */
+ unlink_all_peers_from_tables();
cleanup_all_regs();
+ sip_epa_unregister_all();
+ destroy_escs();
+ clear_sip_domains();
{
struct ao2_iterator iter;
@@ -35487,6 +35491,23 @@ static int unload_module(void)
*/
ast_sched_runq(sched);
+ /*
+ * Wait awhile for the TCP/TLS thread container to become empty.
+ *
+ * XXX This is a hack, but the worker threads cannot be created
+ * joinable. They can die on their own and remove themselves
+ * from the container thus resulting in a huge memory leak.
+ */
+ start = ast_tvnow();
+ while (ao2_container_count(threadt) && (ast_tvdiff_sec(ast_tvnow(), start) < 5)) {
+ sched_yield();
+ }
+ if (ao2_container_count(threadt)) {
+ ast_debug(2, "TCP/TLS thread container did not become empty :(\n");
+
+ return -1;
+ }
+
/* Free memory for local network address mask */
ast_free_ha(localaddr);
@@ -35497,9 +35518,6 @@ static int unload_module(void)
}
ast_mutex_unlock(&authl_lock);
- sip_epa_unregister_all();
- destroy_escs();
-
ast_free(default_tls_cfg.certfile);
ast_free(default_tls_cfg.pvtfile);
ast_free(default_tls_cfg.cipher);
@@ -35508,21 +35526,6 @@ static int unload_module(void)
ast_rtp_dtls_cfg_free(&default_dtls_cfg);
- /*
- * Wait awhile for the TCP/TLS thread container to become empty.
- *
- * XXX This is a hack, but the worker threads cannot be created
- * joinable. They can die on their own and remove themselves
- * from the container thus resulting in a huge memory leak.
- */
- start = ast_tvnow();
- while (ao2_container_count(threadt) && (ast_tvdiff_sec(ast_tvnow(), start) < 5)) {
- sched_yield();
- }
- if (ao2_container_count(threadt)) {
- ast_debug(2, "TCP/TLS thread container did not become empty :(\n");
- }
-
ao2_cleanup(registry_list);
ao2_cleanup(subscription_mwi_list);
@@ -35536,7 +35539,6 @@ static int unload_module(void)
ao2_t_cleanup(threadt, "unref the thread table");
ao2_t_cleanup(sip_monitor_instances, "unref the sip_monitor_instances table");
- clear_sip_domains();
sip_cfg.contact_acl = ast_free_acl_list(sip_cfg.contact_acl);
if (sipsock_read_id) {
ast_io_remove(io, sipsock_read_id);
@@ -35549,8 +35551,6 @@ static int unload_module(void)
ast_context_destroy_by_name(used_context, "SIP");
ast_unload_realtime("sipregs");
ast_unload_realtime("sippeers");
- ast_cc_monitor_unregister(&sip_cc_monitor_callbacks);
- ast_cc_agent_unregister(&sip_cc_agent_callbacks);
sip_reqresp_parser_exit();
sip_unregister_tests();
diff --git a/configure b/configure
index 523f7652e..7e720745e 100755
--- a/configure
+++ b/configure
@@ -9296,7 +9296,7 @@ PJPROJECT_BUNDLED=no
# Check whether --with-pjproject-bundled was given.
if test "${with_pjproject_bundled+set}" = set; then :
- withval=$with_pjproject_bundled; case "${enableval}" in
+ withval=$with_pjproject_bundled; case "${withval}" in
n|no) PJPROJECT_BUNDLED=no ;;
*) PJPROJECT_BUNDLED=yes ;;
esac
diff --git a/configure.ac b/configure.ac
index 161ccab5f..d604d47a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -430,7 +430,7 @@ AH_TEMPLATE(m4_bpatsubst([[HAVE_PJPROJECT_BUNDLED]], [(.*)]), [Define to 1 when
AC_ARG_WITH([pjproject-bundled],
[AS_HELP_STRING([--with-pjproject-bundled],
[Use bundled pjproject libraries])],
- [case "${enableval}" in
+ [case "${withval}" in
n|no) PJPROJECT_BUNDLED=no ;;
*) PJPROJECT_BUNDLED=yes ;;
esac])
diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport
index 3e0213afe..948f628c9 100755
--- a/contrib/scripts/autosupport
+++ b/contrib/scripts/autosupport
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Autosupport Version 2.1.0
+# Autosupport Version 2.1.3
# Collect support information
#
# Copyright (C) 2005-2016, Digium, Inc.
@@ -187,7 +187,7 @@ echo >> $OUTPUT;
# Add check to see if asterisk is running.
if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
for command in "core show version" "pri show version" "dahdi show version" \
- "pjsip show version" "pjsip show buildopts" \
+ "pjsip show version" "pjsip show buildopts" "pjproject show buildopts" \
"core show translation" \
"core show uptime" "core show settings" "core show sysinfo" "core show channels" \
"pri show spans" "dahdi show status" "dahdi show channels" "dahdi show channel 1" \
diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c
index 4ce4e18e9..7da72bca4 100644
--- a/res/res_sorcery_memory_cache.c
+++ b/res/res_sorcery_memory_cache.c
@@ -1555,7 +1555,7 @@ static int sorcery_memory_cache_delete(const struct ast_sorcery *sorcery, void *
ao2_unlock(cache->objects);
if (res) {
- ast_log(LOG_ERROR, "Unable to delete object '%s' from sorcery cache\n", ast_sorcery_object_get_id(object));
+ ast_debug(1, "Unable to delete object '%s' from sorcery cache\n", ast_sorcery_object_get_id(object));
}
return res;