res_pjsip_transport_websocket: Fix security events and simplify implementation.

Transport type determination for security events has been simplified to use
the type present on the message itself instead of searching through configured
transports to find the transport used.

The actual WebSocket transport has also been simplified. It now leverages the
existing PJSIP transport manager for finding the active WebSocket transport
for outgoing messages. This removes the need for res_pjsip_transport_websocket
to store a mapping itself.

(closes issue ASTERISK-22897)
Reported by: Max E. Reyes Vera J.

Review: https://reviewboard.asterisk.org/r/3036/ 
........

Merged revisions 403256 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-12-01 19:58:08 +00:00
parent e93fbf41e6
commit 0620cc0c00
6 changed files with 33 additions and 238 deletions

View File

@@ -263,10 +263,9 @@ static int qualify_contact(struct ast_sip_contact *contact)
ao2_ref(contact, +1);
if (pjsip_endpt_send_request(ast_sip_get_pjsip_endpoint(),
tdata, -1, contact, qualify_contact_cb) != PJ_SUCCESS) {
pjsip_tx_data_dec_ref(tdata);
/* The callback will be called so we don't need to drop the contact ref*/
ast_log(LOG_ERROR, "Unable to send request to qualify contact %s\n",
contact->uri);
ao2_ref(contact, -1);
return -1;
}