summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--codecs/codec_ilbc.c4
-rwxr-xr-xcontrib/scripts/install_prereq2
-rw-r--r--main/backtrace.c2
-rw-r--r--main/cdr.c12
4 files changed, 14 insertions, 6 deletions
diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
index d691f706f..536d68026 100644
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -42,8 +42,8 @@
#ifdef ILBC_WEBRTC
#include <ilbc.h>
-typedef WebRtc_UWord16 ilbc_bytes;
-typedef WebRtc_Word16 ilbc_block;
+typedef uint16_t ilbc_bytes;
+typedef int16_t ilbc_block;
#define BUF_TYPE i16
#else
#include "ilbc/iLBC_encode.h"
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 19da358e3..367a9a975 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -19,7 +19,7 @@ usage() {
}
# Basic build system:
-PACKAGES_DEBIAN="build-essential"
+PACKAGES_DEBIAN="build-essential pkg-config"
# Asterisk: basic requirements:
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libedit-dev libjansson-dev libsqlite3-dev uuid-dev libxml2-dev"
# Asterisk: for addons:
diff --git a/main/backtrace.c b/main/backtrace.c
index aed4ffd94..7dfcfc36d 100644
--- a/main/backtrace.c
+++ b/main/backtrace.c
@@ -130,7 +130,7 @@ char **__ast_bt_get_symbols(void **addresses, size_t num_frames)
}
for (section = bfdobj->sections; section; section = section->next) {
- if (!bfd_get_section_flags(bfdobj, section) & SEC_ALLOC ||
+ if (!(bfd_get_section_flags(bfdobj, section) & SEC_ALLOC) ||
section->vma > offset ||
section->size + section->vma < offset) {
continue;
diff --git a/main/cdr.c b/main/cdr.c
index 8acae607f..4acadf975 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -371,7 +371,7 @@ static ast_cond_t cdr_pending_cond;
/*! \brief A container of the active master CDRs indexed by Party A channel uniqueid */
static struct ao2_container *active_cdrs_master;
-/*! \brief A container of all active CDRs indexed by Party B channel name */
+/*! \brief A container of all active CDRs with a Party B indexed by Party B channel name */
static struct ao2_container *active_cdrs_all;
/*! \brief Message router for stasis messages regarding channel state */
@@ -971,13 +971,21 @@ static void cdr_all_unlink(struct cdr_object *cdr)
ast_assert(cdr->is_root);
+ /* Hold a ref to the root CDR to ensure the list members don't go away on us. */
+ ao2_ref(cdr, +1);
ao2_lock(active_cdrs_all);
- for (cur = cdr->next; cur; cur = next) {
+ for (cur = cdr; cur; cur = next) {
next = cur->next;
ao2_unlink_flags(active_cdrs_all, cur, OBJ_NOLOCK);
+ /*
+ * It is safe to still use cur after unlinking because the
+ * root CDR holds a ref to all the CDRs in the list and we
+ * have a ref to the root CDR.
+ */
ast_string_field_set(cur, party_b_name, "");
}
ao2_unlock(active_cdrs_all);
+ ao2_ref(cdr, -1);
}
/*!