[svn-commits] file: branch file/gulp_new_invite r395266 - /team/file/gulp_new_invite/res/re...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 24 11:21:30 CDT 2013
Author: file
Date: Wed Jul 24 11:21:28 2013
New Revision: 395266
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395266
Log:
Fix a crash when an endpoint sent a CANCEL before it gets a provisional response. (naughty naughty)
Modified:
team/file/gulp_new_invite/res/res_sip/sip_distributor.c
Modified: team/file/gulp_new_invite/res/res_sip/sip_distributor.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_new_invite/res/res_sip/sip_distributor.c?view=diff&rev=395266&r1=395265&r2=395266
==============================================================================
--- team/file/gulp_new_invite/res/res_sip/sip_distributor.c (original)
+++ team/file/gulp_new_invite/res/res_sip/sip_distributor.c Wed Jul 24 11:21:28 2013
@@ -99,17 +99,27 @@
struct ast_taskprocessor *serializer = NULL;
pjsip_rx_data *clone;
- pjsip_rx_data_clone(rdata, 0, &clone);
if (dlg) {
dist = pjsip_dlg_get_mod_data(dlg, distributor_mod.id);
if (dist) {
serializer = dist->serializer;
- clone->endpt_info.mod_data[distributor_mod.id] = dist->endpoint;
}
}
+ if (!pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, &pjsip_cancel_method) && !serializer) {
+ pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 481, NULL, NULL, NULL);
+ goto end;
+ }
+
+ pjsip_rx_data_clone(rdata, 0, &clone);
+
+ if (dist) {
+ clone->endpt_info.mod_data[distributor_mod.id] = dist->endpoint;
+ }
+
ast_sip_push_task(serializer, distribute, clone);
+end:
if (dlg) {
pjsip_dlg_dec_lock(dlg);
}
More information about the svn-commits
mailing list