Earlier versions of the codec_opus samples_count callback can return
negative error values on undecodable frames. This resulted in a divide by
zero exception.
* Added a defensive check in ast_codec_samples_count() for a "negative"
samples count return value. Log the event and set the count to zero.
ASTERISK-27194
Change-Id: Icf69350307ecbbc80a3d74de46af9bd80ea17819
Currently ast_http_send barricades a portion of the content that
needs to be sent in order to establish a connection for things
like the ARI client. The conditional and contents have been changed
to ensure that everything that needs to be sent, will be sent.
ASTERISK-27372
Change-Id: I8816d2d8f80f4fefc6dcae4b5fdfc97f1e46496d
This makes the 'bt' parameter unconditional for ast_store_lock_info and
ast_remove_lock_info. The 'bt' parameter is unused when HAVE_BKTR is
undefined.
Change-Id: Ieced0e920928b735a39c3b5952b806c473d67453
A few places in hashtab use free instead of ast_free, remove declaration
of ASTMM_LIBC from hashtab.c as it's no longer needed.
Change-Id: I2ff089bad71640c03c3ce97f1b00fc962ef79427
* Rename the Party A CDR container from active_cdrs_by_channel to
active_cdrs_master.
* Renamed the support functions associated with active_cdrs_master
appropriately.
ASTERISK-27335
Change-Id: I6104bb3edc3a0b7243ce502e45e8832b0cff14f7
The CDR performance gets worse the further it gets behind in processing
stasis messages. One of the reasons is because of a n*m loop used when
processing Party B information.
* Added a new CDR container that is keyed to Party B so we don't need such
a large loop when processing Party B information.
NOTE: To reduce the size of the patch I deferred to another patch the
renaming of the Party A active_cdrs_by_channel container to
active_cdrs_master and renaming the container's hash and cmp functions
appropriately.
ASTERISK-27335
Change-Id: I0bf66e8868f8adaa4b5dcf9e682e34951c350249
It's possible for bfdobj to be created but syms not created. If syms
was not allocated in the current loop iteration but was allocated in the
previous iteration it would crash.
ASTERISK-27340
Change-Id: I5b110c609f6dfe91339f782a99a431bca5837363
This avoids a crash on stopping a chan_sip which failed to start its TLS server.
ASTERISK-27339 #close
Change-Id: I327fc70db68eaaca5b50a15c7fd687fde79263d5
The CDR performance gets worse the further it gets behind in processing
stasis messages. One of the reasons is we were getting the global config
to determine if we needed to log a debugging message.
* Many calls to ao2_global_obj_ref() were just so we could determine if
debug mode is enabled. Made a global flag to check instead.
* Eliminated many RAII_VAR() usages associated with the remaining
ao2_global_obj_ref() calls.
* Added missing NULL checks for the returned ao2_global_obj_ref() value.
ASTERISK-27335
Change-Id: Iceaad93172862f610cad0188956634187bfcc7cd
The CDR performance gets worse the further it gets behind in processing
stasis messages. One of the reasons is we were getting the global config
even if we didn't need it.
* Most uses of the global config were only needed on off nominal code
paths so it makes sense to not get it until absolutely needed.
ASTERISK-27335
Change-Id: I00c63b7ec233e5bfffd5d976f05568613d3c2365
The CDR performance gets worse the further it gets behind in processing
stasis messages. One of the reasons is we were repeatedly setting string
fields to potentially the same string in base_process_party_a(). Setting
a string field involves allocating room for the new string out of a memory
pool which may have to allocate even more memory.
* Check to see if the string field is already set to the desired string.
ASTERISK-27335
Change-Id: I3ccb7e23f1488417e08cafe477755033eed65a7c
The string comparisons for setting these CDR variables was inverted. We
were repeatedly setting these CDR variables only if the channel snapshots
had the same value.
ASTERISK-27335
Change-Id: I9482073524411e7ea6c03805b16de200cb1669ea
* Store weak proxy objects in instances container.
* Remove special unreference function and replace with macro that calls
ao2_cleanup.
* Add REF_DEBUG information to ast_sorcery_open.
Change-Id: I5a150a4e13cee319d46b5a4654f95a4623a978f8
This function finds a weak proxy in an ao2_container and returns the
real object associated with it.
Change-Id: I9da822049747275f5961b5c0a7f14e87157d65d8
Copy the list of weakproxy callbacks to temporary memory so they can be
run without holding the weakproxy lock.
Change-Id: Ib167622a8a0f873fd73938f7611b2a5914308047
The only caller of cdr_object_fn_table.process_party_b() explicitly does
the check before calling.
Change-Id: Ib0c53cdf5048227842846e0df9d2c19117c45618
Since ASTERISK-26922, this issue affected only those chan_sip which were
* enabled for dual-stack (bindaddr=::), and
* enabled for TCP (tcpenable=yes) and/or TLS (tlsenable=yes), and
* tried to register and/or invite a IPv4-only service,
* via TCP and/or TLS.
Now, ast_tcptls_client_create does not re-bind to [::] anymore.
ASTERISK-27324 #close
Change-Id: I4b242837bdeb1ec7130dc82505c6180a946fd9b5
ast_strings_match uses sscanf and checks for non-zero return to verify a
token was parsed. This is incorrect as sscanf returns EOF (-1) for errors.
ASTERISK-27318 #close
Change-Id: Ifcece92605f58116eff24c5a0a3b0ee08b3c87b1
Some endpoints do not like a stream being reused for a new
media stream. The frame/jitterbuffer can rely on underlying
attributes of the media stream in order to order the packets.
When a new stream takes its place without any notice the
buffer can get confused and the media ends up getting dropped.
This change uses the SSRC change to determine that a new source
is reusing an existing stream and then bridge_softmix renegotiates
each participant such that they see a new media stream. This
causes the frame/jitterbuffer to start fresh and work as expected.
ASTERISK-27277
Change-Id: I30ccbdba16ca073d7f31e0e59ab778c153afae07
When a sip session is refreshed, the stream topology is looped
through, checking each stream for compatible formats. This would
cause a crash if the stream state was AST_STREAM_STATE_REMOVED,
since the formats would never be set for this stream, causing
a NULL value to be returned from ast_stream_get_formats. This
commit adds a check for streams with removed states.
Also removed a stray semicolon.
Change-Id: Ic86f8b65a4a26a60885b28b8b1a0b22e1b471d42