summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-04pbx: Prevent execution of NULL pointer.Corey Farrell
pbx_extension_helper has a check for q->swo.exec == NULL but it doesn't actually return so we would still run the function. Fix the return. Move the 'int res' variable into the only scope which uses it. Also fix a copy-paste error in ast_pbx_init which could result in a crash on allocation failure (we exit with a normal error instead). Change-Id: I0693af921fdc7f56b6a72a21fb816ed08b960a69
2018-01-04Merge "rtp_engine: Add missing unlock."Jenkins2
2018-01-04Merge "translators: Don't use ast_module_running_ref."Joshua Colp
2018-01-04Merge "res_pjsip_history: Add missing unlock to CLI command."Jenkins2
2018-01-04Merge "aco: Fix NULL dereference in error path."Jenkins2
2018-01-04Merge "func_odbc: Add missing unlock's to acf_odbc_read."Jenkins2
2018-01-04translators: Don't use ast_module_running_ref.Corey Farrell
Translators are run during module load before the module is actually running, so it cannot use ast_module_running_ref. ASTERISK-20346 Change-Id: Iaa0e75da99c696e38000f1a41e340abbd7a88f56
2018-01-04rtp_engine: Add missing unlock.Corey Farrell
Change-Id: I380c31a255e060309f4916da11176e0d00813215
2018-01-04res_pjsip_history: Add missing unlock to CLI command.Corey Farrell
Change-Id: I872060a30543776a176a316309602d924a23eb29
2018-01-04aco: Fix NULL dereference in error path.Corey Farrell
Change-Id: Id505167cf0f9414a3c144fa2c1e181a2cf288694
2018-01-04Merge "loader: Create ast_module_running_ref."Joshua Colp
2018-01-04Merge "res_pjsip_session: Check if sequence header is missing"Joshua Colp
2018-01-04Merge "datastore: Add automatic module references."Joshua Colp
2018-01-03func_odbc: Add missing unlock's to acf_odbc_read.Corey Farrell
Change-Id: I828329ecbd252ae8f27a369a046d2b03102b07c6
2018-01-03loader: Create ast_module_running_ref.Corey Farrell
This function returns NULL if the module in question is not running. I did not change ast_module_ref as most callers do not check the result and they always call ast_module_unref. Make use of this function when running registered items from: * app_stack API's * bridge technologies * CLI commands * File formats * Manager Actions * RTP engines * Sorcery Wizards * Timing Interfaces * Translators * AGI Commands * Fax Technologies ASTERISK-20346 #close Change-Id: Ia16fd28e188b2fc0b9d18b8a5d9cacc31df73fcc
2018-01-03Merge "res_pjsip: Add AMI action 'PJSIPShowAors'"Jenkins2
2018-01-03res_pjsip_session: Check if sequence header is missingKevin Harwell
The pjsip_msg_find_hdr function can return NULL. This patch adds a check when searching for the sequence header to make sure a NULL pointer is never de-referenced. Change-Id: I19af23aeeded65be016be92360e8cb7ffe51fad2
2018-01-03Merge "core: Use macros to generate ao2_container callbacks where possible."Jenkins2
2018-01-03Merge "astobj2: Create case-insensitive variants of container function macros."Jenkins2
2018-01-03Merge "aco: Add missing aco_option_type_string for OPT_TIMELEN_T."Joshua Colp
2018-01-03Merge "cdr: submit: fix logic of test for batch mode"Jenkins2
2018-01-02Merge "cdr_mysql: Make sure connection charset is always set"Joshua Colp
2018-01-02Merge "stasis_channels.c: Misc cleanup."Jenkins2
2018-01-02cdr: submit: fix logic of test for batch modeTzafrir Cohen
ASTERISK-27539 #close Change-Id: I33cdf329d2bb4486dcae975c450f6aae94c515f7
2018-01-02res_pjsip: Add AMI action 'PJSIPShowAors'Sungtae Kim
Add an AMI action which provides information on all configured AORs. ASTERISK-27537 Change-Id: If8b990a00909e5b6c0f04a3b8dccd9903dc445eb
2018-01-02aco: Add missing aco_option_type_string for OPT_TIMELEN_T.Corey Farrell
ASTERISK-27117 Change-Id: I8f6c34bb30830be9f7a40823723eb4dcaaa91c61
2017-12-31ice: Increase foundation buffer sizeSean Bright
Per RFC 5245, the foundation specified with an ICE candidate can be up to 32 characters but we are only allowing for 31. ASTERISK-27498 #close Reported by: Michele Prà Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
2017-12-30astobj2: Create case-insensitive variants of container function macros.Corey Farrell
* AO2_STRING_FIELD_CASE_HASH_FN * AO2_STRING_FIELD_CASE_CMP_FN * AO2_STRING_FIELD_CASE_SORT_FN Change-Id: I11af8c6a0c43380a42732553f519c667abb842cf
2017-12-30core: Use macros to generate ao2_container callbacks where possible.Corey Farrell
This uses AO2_STRING_FIELD_HASH_FN and AO2_STRING_FIELD_CMP_FN where possible in the Asterisk core. This removes CMP_STOP from the result of CMP_FN callbacks for the following structure types: * ast_bucket_metadata * ast_bucket_scheme * generic_monitor_instance_list (ccss.c) * ast_bucket_file (media_cache.c) * named_acl Change-Id: Ide4c1449a894bce70dea1fef664dade9b57578f1
2017-12-29datastore: Add automatic module references.Corey Farrell
Add a reference to the calling module when it is active to protect access to datastore->info. Remove module references done by func_periodic_hook as the datastore now handles it. ASTERISK-25128 #close Change-Id: I8357a3711e77591d0d1dd8ab4211a7eedd782c89
2017-12-29Merge "func_channel.c: Update MASTER_CHANNEL documentation"Jenkins2
2017-12-28stasis_channels.c: Misc cleanup.Richard Mudgett
* Use current OBJ_SEARCH_xxx defines instead of the deprecated versions. * Fix hash_cb and cmp_cb container functions to correctly use the OBJ_SEARCH_xxx values. * Remove incorrect usage of CMP_STOP. Most uses in the system have no effect. This allows the collapse of channel_role_single_cmp_cb() and channel_role_multi_cmp_cb() into channel_role_cmp_cb(). * Remove unnecessary usage of RAII_VAR(). Change-Id: I02c405518cab22aa2a082b61e2353bf7cd629a70
2017-12-28Merge "manager.c: Update AMI Status event documentation"Jenkins2
2017-12-28Merge "menuselect: Fix check for running configure."Richard Mudgett
2017-12-28Merge "astobj.h: Remove from Asterisk core."Jenkins2
2017-12-28Merge "cdr: Missing NULL check and unlock."Jenkins2
2017-12-28cdr_mysql: Make sure connection charset is always setSean Bright
When the MYSQL_OPT_RECONNECT option is enabled, the MySQL client API will transparently reconnect when it needs to. Ideally this simplifies our code, but when this reconnection occurs all connection state is lost. Because we are not notified that this has happened, we don't know to set our character set again (with "SET NAMES 'xyz'"). Rather than calling SET NAMES, we instead set the MYSQL_SET_CHARSET_NAME option which will do it for us under the hood on each connect. This option has been present in the MySQL C API for at least 15 years, so it should be safe for most installations. I also snuck a few other changes into this patch: * Default the MySQL port to MYSQL_PORT (3306) instead of 0 if it's not defined. * Fix some erroneous and/or silly checks on the contents of the configuration ast_str values. ASTERISK-27366 #close Reported by: Halil İbrahim YILDIZ Change-Id: I36bf8dc5d5f83584e803b3b1a151dea9396ab8f5
2017-12-28manager.c: Update AMI Status event documentationRichard Mudgett
The AMI Status event had linkedid listed twice and was missing the effective connected line name and number headers. NOTE: The linkedid and other standard channel snapshot fields in the XML documentation are part of the <channel_snapshot/> XML template defined in doc/appdocsxml.xslt. Change-Id: I004c4c4f9e7b40ef55035c831702721bec82496c
2017-12-27bridge_native_rtp.c: Fix reentrancy framehook crash.Richard Mudgett
If two channels enter different native rtp bridges at the same time it is possible that the framehook interface data pointer can be corrupted because the struct variable was declared static. * Fixed the reentrancy corruption by changing the framehook interface struct static variable to a stack local variable. * Moved the hook.data assignment outside of the channel lock. It did not need the lock's protection. It probably was giving a false sense of security. The testsuite channels/pjsip/basic_calls/two_parties/nominal/alice_initiated/bob_hangs_up test caught this with MALLOC_DEBUG and DO_CRASH enabled. Change-Id: If9e35b97d19209b0f984941c1d8eb5f7c55eea91
2017-12-27func_channel.c: Update MASTER_CHANNEL documentationRichard Mudgett
Be more explicit in what is meant by the master channel to eliminate misunderstanding. ASTERISK-23133 Change-Id: I453bcaf4b99404a5a3e345dbf093ac6c1afcfc72
2017-12-27menuselect: Fix check for running configure.Corey Farrell
menuselect/Makefile checks that autoconfig.h and makeopts were newer than the '.in' files. Unfortunately running ./configure does not touch autoconfig.h unless the contents will change. Instead of looking at autoconfig.h we just need to ensure that makeopts is newer than configure. Also make change to configure.ac so bootstrap.sh doesn't re-add the extra trailing line-feed. Change-Id: Ief1f831d6717007f9cebb668c14e92782cd2b794
2017-12-25cdr: Missing NULL check and unlock.Corey Farrell
* handle_dial_message: Missing a check for NULL peer. * cdr_generic_register: Missing unlock on allocation failure. cdr_generic_register is fixed by reordering so the new structure is allocated and initialized before locking the list. Change-Id: I5799b99270d1a7a716a555c31ac85f4b00ce8686
2017-12-23loader: Add volatile to resource_being_loaded.Corey Farrell
Some compiler optimizers seem to assume that dlopen will not use __attribute__((constructor)) functions to call back to the program. This was causing resource_being_loaded to be optimized away completely. ASTERISK-27531 #close Tested By: abelbeck Change-Id: If17a3b889e06811a0e7119f0539d052494d6ece9
2017-12-22AST-2017-014: res_pjsip - Missing contact header can cause crashKevin Harwell
Those SIP messages that create dialogs require a contact header to be present. If the contact header was missing from the message it could cause Asterisk to crash. This patch checks to make sure SIP messages that create a dialog contain the contact header. If the message does not and it is required Asterisk now returns a "400 Missing Contact header" response. Also added NULL checks when retrieving the contact header that were missing as a "just in case". ASTERISK-27480 #close Change-Id: I1810db87683fc637a9e3e1384a746037fec20afe
2017-12-22astobj.h: Remove from Asterisk core.Corey Farrell
This is the old ASTOBJ macro's which are no longer used except by the deprecated netsock.c. Move it to the chan_iax2 include folder so it does not get used elsewhere. Change-Id: I7e4ae96678b36b9f41d3cae14b167f110eb5d349
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22Merge "Fix some invalid Unicode characters"Jenkins2
2017-12-22Merge "app_voicemail: Fix file copy error handling."Jenkins2
2017-12-21Fix some invalid Unicode charactersSean Bright
configs/samples/minivm.conf.sample contains invalid UTF-8, but that appears to be intentional. Change-Id: I7b1e0d332f3380fd0425962a3c9c55f9b200c8cc
2017-12-21Merge "Fix Common Typo's."Jenkins2