summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2017-11-20Merge "res_snmp: Declare RONLY if net-snmp headers do not." into 15Joshua Colp
2017-11-20Merge "res_pjsip: Fix warning by deferring implicit type cast." into 15Joshua Colp
2017-11-19res_pjsip: Fix warning by deferring implicit type cast.Corey Farrell
Mac doesn't like the comparison of -1 to an enum, so store the result of ast_sip_str_to_dtmf to an int so we can check for the negative return value. ast_sip_str_to_dtmf returns an int so this is only delaying the implicit type cast. Change-Id: I0c262c1719ee951aae1f437d733a301cf5f8ad29
2017-11-18res_snmp: Declare RONLY if net-snmp headers do not.Corey Farrell
Some net-snmp builds do not provide the RONLY declare, only NETSNMP_OLDAPI_RONLY. Map RONLY to NETSNMP_OLDAPI_RONLY to get around this error. Change-Id: Ida5c7ad9406515825485c4d3b4a34fd6ad0da577
2017-11-18res_fax: Remove checks for unsigned values being >= 0.Corey Farrell
It's impossible for gwtimeout or fdtimeout to be less than 0 because they are unsigned int's. Remove checks and unreachable branches. Change-Id: Ib2286960621e6ee245e40013c84986143302bc78
2017-11-18res_rtp_asterisk.c: Fix rtp source address learning for broken clientsPirmin Walthert
Some clients do not send rtp packets every ptime ms. This can lead to situations in which the rtp source learning algorithm will never learn the address of the client. This has been discovered on a Mac mini with a pjsip based softphone after updating to Sierra: as soon as USB headsets are involved, the softphone will send the second packet 30ms after the first, the third 30ms after the second and the fourth 1ms after the third. So in the old implmentation the rtp source learning algorithm was repeatedly reset on the fourth packet. The patch changes the algorithm in a way that doesn't take the arrival time between two consecutive packets into account but the time between the first and the last packet of a learning sequence. The patch also fixes a second problem: when a user was using a wrong value for the probation setting there was a LOG_WARNING output stating that the value had been set to the default value instead. However the code for setting the value back to defaults was missing. ASTERISK-27421 #close Change-Id: If778fe07678a6fd2041eaca7cd78267d0ef4fc6c
2017-11-17res_pjsip: Use reasonable buffer lengths for endpoint identificationSean Bright
Domains themselves can be up to 255 characters long (per RFC 1035), so our current buffer sizes are wholly inadequate for many use cases. Change-Id: If3f30a68307f1365a1fe06bc4b854c62842c9292
2017-11-16res_pjsip_transport_websocket: Give transport a meaningful descriptionSean Bright
We were not \0 terminating this string, so any attempt to print it would in the best case show an empty string and in the worst case potentially crash. Change-Id: I63d96ef8f7516ac02a0f91e22dfa8acdc615042c
2017-11-16res_pjsip: Use sorcery prefix operation for contact lookupSean Bright
This improves performance for registrations assuming that res_config_astdb is not in use. Change-Id: I86f37aa9ef07a4fe63448cb881bbadd996834bb1
2017-11-16Merge "pjsip / hep: Provide correct local address for Websockets." into 15Jenkins2
2017-11-14pjsip / hep: Provide correct local address for Websockets.Joshua Colp
Previously for PJSIP the local address of WebSocket connections was set to the remote address. For logging purposes this is not particularly useful. The WebSocket API has been extended to allow the local address to be queried and this is used in PJSIP to set the local address to the correct value. The PJSIP HEP support has also been tweaked so that reliable transports always use the local address on the transport and do not try to (wrongly) guess. As they are connection based it is impossible for the source to be anything else. ASTERISK-26758 ASTERISK-27363 Change-Id: Icd305fd038ad755e2682ab2786e381f6bf29e8ca
2017-11-13sorcery: Add ast_sorcery_retrieve_by_prefix()Sean Bright
Some consumers of the sorcery API use ast_sorcery_retrieve_by_regex only so that they can anchor the potential match as a prefix and not because they truly need regular expressions. Rather than using regular expressions for simple prefix lookups, add a new operation - ast_sorcery_retrieve_by_prefix - that does them. Patches against 13 and 15 have a compatibility layer needed to maintain ABI that is not needed in master. Change-Id: I56f4e20ba1154bd52281f995c27a429a854f6a79
2017-11-13Merge "res_pjsip_pubsub: Ensure remote URI contains URI only." into 15Jenkins2
2017-11-09Merge "res_pjsip_registrar.c: Fix AOR and pjproject group deadlock." into 15Kevin Harwell
2017-11-09Merge "res_pjsip_pubsub: Fix multiple leaks on failure to append vectors." ↵Joshua Colp
into 15
2017-11-09Merge "res_pjsip_history: Fix multiple leaks on vector append failure." into 15Joshua Colp
2017-11-09Merge "res_pjsip_session: Fix multiple leaks." into 15Joshua Colp
2017-11-09Merge "res_pjsip_session: Check for errors from ↵Joshua Colp
ast_stream_topology_set_stream." into 15
2017-11-08Merge "res_pjsip_t38: Better error checking for t38_create_media_state." into 15Joshua Colp
2017-11-08Merge "AST-2017-011 - res_pjsip_session: session leak when a call is ↵George Joseph
rejected" into 15
2017-11-08Merge "res_pjproject.c: Fix ast_strdup() alloc failure." into 15Jenkins2
2017-11-08AST-2017-011 - res_pjsip_session: session leak when a call is rejectedKevin Harwell
A previous commit made it so when an invite session transitioned into a disconnected state destruction of the Asterisk pjsip session object was postponed until either a transport error occurred or the event timer expired. However, if a call was rejected (for instance a 488) before the session was fully established the event timer may not have been initiated, or it was canceled without triggering either of the session finalizing states mentioned above. Really the only time destruction of the session should be delayed is when a BYE is being transacted. This is because it's possible in some cases for the session to be disconnected, but the BYE is still transacting. This patch makes it so the session object always gets released (no more memory leak) when the pjsip session is in a disconnected state. Except when the method is a BYE. Then it waits until a transport error occurs or an event timeout. ASTERISK-27345 #close Reported by: Corey Farrell Change-Id: I1e724737b758c20ac76d19d3611e3d2876ae10ed
2017-11-08Merge "res_pjsip_exten_state: Check for vector append failure." into 15Joshua Colp
2017-11-08Merge "res_stasis: Fix multiple leaks." into 15Joshua Colp
2017-11-08Merge "res_pjsip_outbound_registration: Fix leak on vector add failure." into 15Joshua Colp
2017-11-08Merge "res_pjsip: Avoid crash when contact uri is empty string" into 15Jenkins2
2017-11-07Merge "res_pjsip: Fix leak on error in ast_sip_auth_vector_init." into 15Jenkins2
2017-11-07res_pjsip_pubsub: Fix multiple leaks on failure to append vectors.Corey Farrell
Change-Id: I68ece0073ea79667ca41eb10405f516f1d30d482
2017-11-07res_pjsip_history: Fix multiple leaks on vector append failure.Corey Farrell
Change-Id: I41e8d5183ace284095cc721f3b1fb32ade3f940f
2017-11-07res_pjsip_session: Fix multiple leaks.Corey Farrell
* Pre-initialize cloned media state vectors to final size to ensure vector errors cannot happen later in the clone initialization. * Release session_media on vector replace failure in ast_sip_session_media_state_add. * Release clone and media_state in ast_sip_session_refresh if we fail to append to the stream topology, return an error. Change-Id: Ib5ffc9b198683fa7e9bf166d74d30c1334c23acb
2017-11-07Merge "res_pjsip_config_wizard: Fix leaks and add check for malloc failure." ↵Jenkins2
into 15
2017-11-07Merge "res_stasis_playback: Check for failure to append vector." into 15Joshua Colp
2017-11-07Merge "res_ari_events: Fix use after free / double-free of JSON message." ↵Joshua Colp
into 15
2017-11-07res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.Richard Mudgett
One of the patches for ASTERISK_27147 introduced a deadlock regression. When the connection oriented transport shut down, the code attempted to remove the associated contact. However, that same transport had just requested a registration that we hadn't responded to yet. Depending upon timing we could deadlock. * Made send the REGISTER response after we completed processing the request contacts and released the AOR lock to avoid the deadlock. ASTERISK-27391 Change-Id: I89a90f87cb7a02facbafb44c75d8845f93417364
2017-11-07Merge "res_pjsip: Ignore empty TLS configuration" into 15Joshua Colp
2017-11-07res_pjsip_session: Check for errors from ast_stream_topology_set_stream.Corey Farrell
Free memory and return error if ast_stream_topology_set_stream fails. Change-Id: I9f4dbf44bed627243d2f1dd8aea2eab6c38a028d
2017-11-07res_pjsip_t38: Better error checking for t38_create_media_state.Corey Farrell
Change-Id: I81b2587427c6982aa3e2a3f9ad69cce8d316eb10
2017-11-07res_stasis: Fix multiple leaks.Corey Farrell
* res/stasis/app.c JSON passed to app_send needs to be released. * res/stasis_message.c: objects leak if vector append fails. Change-Id: I8dd5385b9f50a5cadf2b1d16efecffd6ddb4db4a
2017-11-07res_pjsip: Avoid crash when contact uri is empty stringAaron An
Asterisk will crash if contact uri is invalid, so contact_apply_handler should check if the uri is NULL or empty. ASTERISK-27393 #close Reported-by: Aaron An Tested-by: AaronAn Change-Id: Ia0309bdc6b697c73c9c736e1caec910b77ca69f5
2017-11-07Merge "stasis/app.c: Optimize stasis_app_get_debug_by_name()" into 15Jenkins2
2017-11-07Merge "Fix ast_(v)asprintf() malloc failure usage conditions." into 15Joshua Colp
2017-11-07res_pjproject.c: Fix ast_strdup() alloc failure.Richard Mudgett
Change-Id: I74688038e7afe3a279359cce53aadb28ade51ead
2017-11-06res_pjsip_outbound_registration: Fix leak on vector add failure.Corey Farrell
Change-Id: I774b88b3c9da41edd4dc8d78f095481f52f2bd46
2017-11-06res_pjsip_exten_state: Check for vector append failure.Corey Farrell
Release reference to publisher if we fail to add it to the vector. Change-Id: I64dff3f481b67b9884f37cadba7a5ccf23d084f3
2017-11-06res_pjsip_config_wizard: Fix leaks and add check for malloc failure.Corey Farrell
wizard_apply_handler(): - Free host if we fail to add it to the vector. wizard_mapped_observer(): - Check for otw allocation failure. - Free otw if we fail to add it to the vector. Change-Id: Ib5d3bcabbd9c24dd8a3c9cc692a794a5f60243ad
2017-11-06res_stasis_playback: Check for failure to append vector.Corey Farrell
Free resources and return error if we fail to append the vector in stasis_app_control_play_uri. Change-Id: I22c4a90dd859b253f2850c6511de48b25609422b
2017-11-06res_pjsip: Fix leak on error in ast_sip_auth_vector_init.Corey Farrell
Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
2017-11-06res_pjproject: Handle error from adding to the buildopts vector.Corey Farrell
Change-Id: I076c7bd207c7989a23005395ce1735392657be65
2017-11-06res_ari_events: Fix use after free / double-free of JSON message.Corey Farrell
When stasis_app_message_handler needs to queue a message for a later connection it needs to bump the message reference so it doesn't get freed when the caller releases it's reference. Change-Id: I82696df8fe723b3365c15c3f7089501da8daa892
2017-11-06Merge "dtls: Add support for ephemeral DTLS certificates." into 15Jenkins2