asterisk/res
Joshua Colp b79cc62057 res_stasis_device_state: Protect the adding/removing of subscriptions.
The adding and removing of device state subscriptions did not protect
fully against simultaneous manipulation. In particular the subscribe
case allowed a small window where two subscriptions could be added for
the same device state instead of just one.

This change makes the code hold the subscriptions lock for the entirety
of each operation to ensure that two are not occurring at the same time.

ASTERISK-26770

Change-Id: I3e7f8eb9d09de440c9024d2dd52029f6f20e725b
2017-02-07 10:56:34 -06:00
..
ael core/pbx: dialplan show - display filename/line# 2017-01-04 14:06:20 -06:00
ari ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
parking core/pbx: dialplan show - display filename/line# 2017-01-04 14:06:20 -06:00
res_pjsip Update qualifies when AOR configuration changes. 2017-02-01 14:21:04 -06:00
snmp Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis Merge "ari: Implement 'debug all' and request/response logging" 2017-01-26 17:06:40 -06:00
stasis_recording stasis_recording/stored: remove calls to deprecated readdir_r function. 2016-11-04 13:56:42 -05:00
Makefile Build System: Create Makefile macro MOD_ADD_SOURCE. 2015-04-14 12:53:03 -04:00
ari.make Build System: Create Makefile macro MOD_ADD_SOURCE. 2015-04-14 12:53:03 -04:00
res.xml build_tools: Add ability to download variants to download_externals 2016-09-25 13:40:23 -05:00
res_adsi.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_ael_share.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_ael_share.exports.in Allow symbol export filtering to work properly on platforms that have symbol prefixes. 2010-04-02 18:57:58 +00:00
res_agi.c res_agi: Prevent an AGI from eating frames it should not. (Re-do) 2017-02-02 13:02:03 -06:00
res_agi.exports.in Allow symbol export filtering to work properly on platforms that have symbol prefixes. 2010-04-02 18:57:58 +00:00
res_ari.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari.exports.in Rename everything Stasis-HTTP to ARI 2013-07-27 23:11:02 +00:00
res_ari_applications.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_asterisk.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_bridges.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_channels.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_device_states.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_endpoints.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_events.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_mailboxes.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_model.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_ari_model.exports.in Rename everything Stasis-HTTP to ARI 2013-07-27 23:11:02 +00:00
res_ari_playbacks.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_recordings.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_ari_sounds.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_calendar.c res_calendar: delete old calendars after reload 2016-12-31 08:43:50 +01:00
res_calendar.exports.in Allow symbol export filtering to work properly on platforms that have symbol prefixes. 2010-04-02 18:57:58 +00:00
res_calendar_caldav.c res_calendar_caldav: Add support reading gmail calendar 2016-11-29 13:35:26 -02:00
res_calendar_ews.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_calendar_exchange.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_calendar_icalendar.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_chan_stats.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_clialiases.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_clioriginate.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_config_curl.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_config_ldap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_config_odbc.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_config_pgsql.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_config_sqlite.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_config_sqlite3.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_convert.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_corosync.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_crypto.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_crypto.exports.in Remove built-in AES code and use optional_api instead 2010-07-21 19:11:32 +00:00
res_curl.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_endpoint_stats.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_fax.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_fax.exports.in res_fax: Provide AMI equivalents for fax CLI commands 2014-07-18 15:49:46 +00:00
res_fax_spandsp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_celt.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_g729.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_h263.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_h264.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_ilbc.c codecs: Add iLBC 20. 2016-07-22 10:09:08 +02:00
res_format_attr_opus.c res_format_attr_opus: Fix crash when fmtp contains spaces. 2016-12-08 11:47:30 +00:00
res_format_attr_silk.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_siren7.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_siren14.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_vp8.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_hep.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_hep.exports.in res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded 2016-06-08 12:32:02 -05:00
res_hep_pjsip.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_hep_rtcp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_http_media_cache.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_http_post.c Implement internal abstraction for iostreams 2016-11-15 22:25:14 +02:00
res_http_websocket.c Fix IO conversion bug 2016-12-08 18:34:28 +00:00
res_http_websocket.exports.in res_http_websocket: Export symbol for ast_websocket_set_timeout 2014-06-26 18:27:53 +00:00
res_limit.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_manager_devicestate.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
res_manager_presencestate.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
res_monitor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_monitor.exports.in Allow symbol export filtering to work properly on platforms that have symbol prefixes. 2010-04-02 18:57:58 +00:00
res_musiconhold.c res_musiconhold.c: Fix format ref leak when parsing MOH config class. 2017-01-24 13:56:12 -06:00
res_mutestream.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_mwi_external.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_mwi_external.exports.in External MWI core support. 2014-01-06 17:45:25 +00:00
res_mwi_external_ami.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_odbc.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_odbc.exports.in res_odbc: Fix exports.in for missing symbols 2016-02-16 16:42:26 -06:00
res_odbc_transaction.c res_odbc_transaction: add dep on generic_odbc 2016-08-21 18:56:01 -05:00
res_odbc_transaction.exports.in res_odbc: Remove connection management 2016-01-22 11:59:06 -06:00
res_parking.c core/pbx: dialplan show - display filename/line# 2017-01-04 14:06:20 -06:00
res_phoneprov.c Implement internal abstraction for iostreams 2016-11-15 22:25:14 +02:00
res_phoneprov.exports.in res_phoneprov: Refactor phoneprov to allow pluggable config providers 2014-10-09 17:46:23 +00:00
res_pjproject.c PJPROJECT logging: Fix detection of max supported log level. 2017-01-24 11:25:19 -06:00
res_pjproject.exports.in res_pjproject: Add module providing pjproject logging and utils 2016-01-20 09:56:13 -07:00
res_pjsip.c res_pjsip: Fix some off nominal tdata leaks. 2017-02-06 11:02:35 -06:00
res_pjsip.exports.in res_pjsip: AMI commands and events. 2013-11-23 17:26:57 +00:00
res_pjsip_acl.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
res_pjsip_authenticator_digest.c res_pjsip_authenticator_digest: Don't use source port in nonce verification 2016-05-09 14:17:43 -05:00
res_pjsip_caller_id.c res_pjsip_caller_id: Fix crash on session timers UPDATE on inbound calls. 2016-10-27 08:30:36 -05:00
res_pjsip_config_wizard.c core/pbx: dialplan show - display filename/line# 2017-01-04 14:06:20 -06:00
res_pjsip_dialog_info_body_generator.c res_pjsip_exten_state: Use the extension for publishing to. 2016-05-18 18:37:27 -05:00
res_pjsip_diversion.c res_pjsip: Fix known compact header issues 2016-12-31 20:00:46 -06:00
res_pjsip_dlg_options.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_pjsip_dtmf_info.c res_pjsip_empty_info: Respond to empty SIP INFO packets 2016-05-19 09:08:37 -03:00
res_pjsip_empty_info.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_pjsip_endpoint_identifier_anonymous.c res_pjsip: disable multi domain to improve realtime performace 2016-04-27 10:58:43 -05:00
res_pjsip_endpoint_identifier_ip.c res_pjsip_endpoint_identifier_ip: Fix memory leak of hosts when resolving. 2017-01-26 10:59:10 -06:00
res_pjsip_endpoint_identifier_user.c res_pjsip: Add ignore_uri_user_options option. 2016-09-09 17:13:02 -05:00
res_pjsip_exten_state.c res_pjsip: Added "subscribe_context" to endpoint 2016-07-06 10:30:27 -04:00
res_pjsip_exten_state.exports.in The large GULP->PJSIP renaming effort. 2013-07-30 18:14:50 +00:00
res_pjsip_header_funcs.c res_pjsip: Add clarifying documentation to PJSIP_HEADER help text 2016-05-27 12:43:54 -05:00
res_pjsip_history.c debug_utilities: Add ast_logescalator 2017-01-27 15:10:02 -06:00
res_pjsip_logger.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_pjsip_messaging.c Merge "res_pjsip: Add ignore_uri_user_options option." 2016-09-14 12:27:28 -05:00
res_pjsip_mwi.c res_pjsip: Fix some off nominal tdata leaks. 2017-02-06 11:02:35 -06:00
res_pjsip_mwi_body_generator.c res_pjsip_mwi_body_generator: Re-order the body items 2016-05-30 19:31:26 -05:00
res_pjsip_nat.c res_pjsip: Fix infinite recursion when loading transports from realtime 2016-02-08 19:11:18 -06:00
res_pjsip_notify.c res_pjsip: Strip spaces from items parsed from comma-separated lists 2016-03-07 13:16:41 -06:00
res_pjsip_one_touch_record_info.c res_pjsip_empty_info: Respond to empty SIP INFO packets 2016-05-19 09:08:37 -03:00
res_pjsip_outbound_authenticator_digest.c res_pjsip_outbound_authenticator_digest.c: Fix spacing in warning messages. 2017-01-20 07:22:13 -06:00
res_pjsip_outbound_publish.c res_pjsip_outbound_publish: Fix crash when publishing device state. 2016-10-28 14:30:02 -04:00
res_pjsip_outbound_publish.exports.in res_pjsip_outbound_publish: Add module which provides outbound PUBLISH support. 2014-08-07 14:35:09 +00:00
res_pjsip_outbound_registration.c res_pjsip_outbound_registration.c: Filter redundant statsd reporting. 2016-12-02 11:56:59 -06:00
res_pjsip_path.c res_pjsip: Add ignore_uri_user_options option. 2016-09-09 17:13:02 -05:00
res_pjsip_phoneprov_provider.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
res_pjsip_pidf_body_generator.c PJSIP XML, XPIDF: Fix buffer size overwrite memory corruption error. 2015-07-06 16:15:12 -05:00
res_pjsip_pidf_digium_body_supplement.c res_pjsip: Ensure sanitized XML is NULL terminated. 2015-08-06 05:20:47 -05:00
res_pjsip_pidf_eyebeam_body_supplement.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
res_pjsip_publish_asterisk.c core: Entity ID is not set or invalid 2016-08-15 13:35:59 -05:00
res_pjsip_pubsub.c res_pjsip_pubsub.c: Implement "pjsip show subscriptions" commands. 2017-01-23 18:07:04 -06:00
res_pjsip_pubsub.exports.in res_pjsip_mwi: Add voicemail extension and mwi_subscribe_replaces_unsolicited 2016-03-30 13:23:54 -05:00
res_pjsip_refer.c Merge "res_pjsip: Fix known compact header issues" 2017-01-09 07:23:17 -06:00
res_pjsip_registrar.c Update qualifies when AOR configuration changes. 2017-02-01 14:21:04 -06:00
res_pjsip_registrar_expire.c res_pjsip_registrar_expire.c: Remove extra linefeed in debug message. 2016-11-10 16:59:41 -05:00
res_pjsip_rfc3326.c res_pjsip_rfc3326.c: Fix crash when channel goes away. 2015-11-13 16:34:41 -05:00
res_pjsip_sdp_rtp.c res_rtp: Fix regression when IPv6 is not available. 2016-11-30 14:18:05 -05:00
res_pjsip_send_to_voicemail.c Merge "res_pjsip_send_to_voicemail.c: Allow either quoted or not send_to_vm reason." 2016-03-03 05:32:59 -06:00
res_pjsip_session.c res_pjsip_session: Access SIPDOMAIN via Dialplan. 2017-01-04 14:11:30 +01:00
res_pjsip_session.exports.in res_pjsip_refer: Fix occasional unexpected BYE sent after receiving a REFER. 2015-03-10 16:08:40 +00:00
res_pjsip_sips_contact.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
res_pjsip_t38.c res_rtp: Fix regression when IPv6 is not available. 2016-11-30 14:18:05 -05:00
res_pjsip_transport_management.c res_pjsip_transport_management: Convert time in log message to seconds. 2016-09-14 09:53:33 -05:00
res_pjsip_transport_websocket.c res_pjsip/chan_sip: Advertise 'ws' in the SIP URI transport parameter 2016-11-28 14:37:50 -05:00
res_pjsip_xpidf_body_generator.c PJSIP XML, XPIDF: Fix buffer size overwrite memory corruption error. 2015-07-06 16:15:12 -05:00
res_pktccops.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_pktccops.exports.in Allow symbol export filtering to work properly on platforms that have symbol prefixes. 2010-04-02 18:57:58 +00:00
res_realtime.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_resolver_unbound.c res_resolver_unbound.c: Fix frequent ref leak caught by excessive ref trap. 2017-02-01 17:33:41 -06:00
res_rtp_asterisk.c res_rtp_asterisk: Swap byte-order when sending signed linear 2017-02-01 10:42:42 -05:00
res_rtp_multicast.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_rtp_multicast.exports.in multicast RTP: Add dialing options 2016-05-27 11:00:09 -05:00
res_security_log.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_smdi.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_smdi.exports.in Allow symbol export filtering to work properly on platforms that have symbol prefixes. 2010-04-02 18:57:58 +00:00
res_snmp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_sorcery_astdb.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_sorcery_config.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_sorcery_memory.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_sorcery_memory_cache.c Add reload options to CLI/AMI stale object commands. 2017-01-25 17:44:01 -06:00
res_sorcery_realtime.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_speech.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_speech.exports.in app_speech_utils: Fix unresolved symbol ast_speech_get_setting(). 2013-09-16 18:00:32 +00:00
res_srtp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_srtp.exports.in Reverting accidental ci of wrong change in r433061 2015-03-17 22:03:01 +00:00
res_stasis.c ari: Implement 'debug all' and request/response logging 2017-01-23 10:25:58 -07:00
res_stasis.exports.in Moved core logic from app_stasis to res_stasis 2013-04-15 16:43:47 +00:00
res_stasis_answer.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_stasis_answer.exports.in Add missing exports file 2013-05-20 14:21:39 +00:00
res_stasis_device_state.c res_stasis_device_state: Protect the adding/removing of subscriptions. 2017-02-07 10:56:34 -06:00
res_stasis_device_state.exports.in ARI: Implement device state API 2013-11-23 17:48:28 +00:00
res_stasis_mailbox.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_stasis_mailbox.exports.in ARI: Add mailboxes resource for controlling and polling external MWI 2014-01-14 23:44:57 +00:00
res_stasis_playback.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_stasis_playback.exports.in This patch implements the REST API's for POST /channels/{channelId}/play 2013-05-23 20:11:35 +00:00
res_stasis_recording.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_stasis_recording.exports.in ARI - channel recording support 2013-07-03 17:58:45 +00:00
res_stasis_snoop.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_stasis_snoop.exports.in ari: Add Snoop operation for spying/whispering on channels. 2013-11-23 12:40:46 +00:00
res_stasis_test.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_stasis_test.exports.in Initial support for endpoints. 2013-05-08 13:39:08 +00:00
res_statsd.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_statsd.exports.in res_statsd: Fix exports.in for missing symbols 2016-02-16 12:26:29 -06:00
res_stun_monitor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_timing_dahdi.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_timing_kqueue.c res_timing: Don't close FD 0 when out of open files. 2015-07-02 05:13:37 -05:00
res_timing_pthread.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_timing_timerfd.c res_timing: Don't close FD 0 when out of open files. 2015-07-02 05:13:37 -05:00
res_xmpp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_xmpp.exports.in Add a new unified Jingle, Google Jingle, and Google Talk channel driver written from scratch called chan_motif. 2012-07-07 17:06:51 +00:00