summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2017-10-26codec.c: Defensively check the returned samples.Richard Mudgett
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
2017-10-25Merge "Single API for ast_store_lock_info and ast_remove_lock_info."Joshua Colp
2017-10-25http.c: Fix http header send content.Ben Ford
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
2017-10-25Merge "hashtab: Use ast_free."Joshua Colp
2017-10-24Single API for ast_store_lock_info and ast_remove_lock_info.Corey Farrell
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
2017-10-23hashtab: Use ast_free.Corey Farrell
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
2017-10-23main/Makefile: Remove rule for non-existant testexpr2.Corey Farrell
Change-Id: Ibb3e47f27a395d74d8c5263db015b05434f5969b
2017-10-16cdr.c: Rename the Party A CDR container.Richard Mudgett
* 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
2017-10-16cdr.c: Add container to key off of Party B channel names.Richard Mudgett
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
2017-10-16Merge "declare optional openssl dependencies in moduleinfo"Jenkins2
2017-10-16Merge "cdr.c: Eliminated many calls to ao2_global_obj_ref()."Joshua Colp
2017-10-16Merge "cdr.c: Defer getting ao2_global_obj_ref() until needed."Joshua Colp
2017-10-15Merge "ast_bt_get_symbols: Prevent double-free."Jenkins2
2017-10-15Merge "tcptls: NULL-check the parameter of ast_ssl_teardown before accessing ↵Joshua Colp
it."
2017-10-13Merge "cdr.c: Set stringfields only if they are different."Jenkins2
2017-10-13Merge "cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr"Kevin Harwell
2017-10-13ast_bt_get_symbols: Prevent double-free.Corey Farrell
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
2017-10-13tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it.Alexander Traud
This avoids a crash on stopping a chan_sip which failed to start its TLS server. ASTERISK-27339 #close Change-Id: I327fc70db68eaaca5b50a15c7fd687fde79263d5
2017-10-12cdr.c: Eliminated many calls to ao2_global_obj_ref().Richard Mudgett
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
2017-10-12cdr.c: Defer getting ao2_global_obj_ref() until needed.Richard Mudgett
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
2017-10-12cdr.c: Set stringfields only if they are different.Richard Mudgett
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
2017-10-12cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddrRichard Mudgett
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
2017-10-12features, manager : Add CancelAtxfer AMI actionThomas Sevestre
Add action to cancel feature attended transfer with AMI interface ASTERISK-27215 #close Change-Id: Iab8a81362b5a1757e2608f70b014ef863200cb42
2017-10-12Merge "sorcery: Use ao2_weakproxy to hold list of instances."Jenkins2
2017-10-12Merge "named_locks: Use ao2_weakproxy_find."Jenkins2
2017-10-12Merge "astobj2: Add ao2_weakproxy_find function."Jenkins2
2017-10-12Merge "astobj2: Run weakproxy callbacks outside of lock."Jenkins2
2017-10-11cdr.c: Defer misc checks.Richard Mudgett
Try to defer some checks until needed in case there is an early exit. Change-Id: Ibc6b34c38a4f60ad4f9b67984b7d070a07257064
2017-10-10sorcery: Use ao2_weakproxy to hold list of instances.Corey Farrell
* 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
2017-10-10named_locks: Use ao2_weakproxy_find.Corey Farrell
Change-Id: I0ce8a1b7101b6caac6a19f83a89f00eaba1e9d9c
2017-10-10astobj2: Add ao2_weakproxy_find function.Corey Farrell
This function finds a weak proxy in an ao2_container and returns the real object associated with it. Change-Id: I9da822049747275f5961b5c0a7f14e87157d65d8
2017-10-10astobj2: Run weakproxy callbacks outside of lock.Corey Farrell
Copy the list of weakproxy callbacks to temporary memory so they can be run without holding the weakproxy lock. Change-Id: Ib167622a8a0f873fd73938f7611b2a5914308047
2017-10-10cdr.c: Eliminated simple RAII_VAR usages.Richard Mudgett
Change-Id: I150505db307249a962987e7b941bdd369bb91f35
2017-10-10Merge "tcptls: Do not re-bind to wildcard on client creation."Joshua Colp
2017-10-10declare optional openssl dependencies in moduleinfoTzafrir Cohen
Declare optional openssl dependencies in: * res_rtp_asterisk.c * tcptls.c ASTERISK-27328 #close Change-Id: I2636f1c05b8104b4fe6f36cce0ebd9a98b9c78ab
2017-10-09Merge "cdr.c: Replace redundant check with an ast_assert()"Jenkins2
2017-10-09Merge "cdr.h: Fix doxygen comments."Jenkins2
2017-10-09Merge "cdr.c: Use current ao2 flag names"Joshua Colp
2017-10-09cdr.c: Replace redundant check with an ast_assert()Richard Mudgett
The only caller of cdr_object_fn_table.process_party_b() explicitly does the check before calling. Change-Id: Ib0c53cdf5048227842846e0df9d2c19117c45618
2017-10-09cdr.c: Replace inlined code with ao2_t_replace()Richard Mudgett
Change-Id: I9f424f5282ca7d833592f958d95f1b2bafb549b0
2017-10-09cdr.c: Use current ao2 flag namesRichard Mudgett
Change-Id: Ib59d7d2f2a4a822754628f2c48a308d6791a6e6e
2017-10-09cdr.h: Fix doxygen comments.Richard Mudgett
* Also some misc formatting in cdr.c. Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a
2017-10-08tcptls: Do not re-bind to wildcard on client creation.Alexander Traud
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
2017-10-05main/strings: Fix uninitialized value.Corey Farrell
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
2017-09-28heap.c: No need to calloc heap pointer array.Richard Mudgett
Change-Id: I5ae2f316229f336eb90d99c7af7ed07a33097e68
2017-09-25channel.c: Fix invalid reference in conditionaled out code.Richard Mudgett
ASTERISK-27289 Change-Id: I7a415948116493050614d9f4fa91ffbe0c21ec4c
2017-09-21Merge "bridge: Change participant SFU streams when source streams change."Joshua Colp
2017-09-21Merge "res_pjsip_session: Check for removed stream state."Joshua Colp
2017-09-21bridge: Change participant SFU streams when source streams change.Joshua Colp
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
2017-09-20res_pjsip_session: Check for removed stream state.Ben Ford
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