From 5278050e615aeb9e1a1a396125b4c23f097fbbd9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 16 Apr 2009 15:00:42 +0000 Subject: [PATCH] Wed Apr 8 16:37:43 CDT 2009 Pekka Pessi * nua_session.c: do not restart CANCEL requests Ignore-this: 2c9d51bbafca2256630a0ea73982abea Fixes FreesWitch bug SFSIP-134, reported by vile, initial patch by Mike Jerris. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13061 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- .../libsofia-sip-ua/nua/nua_session.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 2f136e77c7..47636e2159 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Thu Apr 16 09:59:45 CDT 2009 +Thu Apr 16 10:00:29 CDT 2009 diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c index bec5b082e9..bba8915386 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c @@ -1436,6 +1436,10 @@ static int nua_invite_client_complete(nua_client_request_t *cr) static int nua_cancel_client_request(nua_client_request_t *cr, msg_t *msg, sip_t *sip, tagi_t const *tags); +static int nua_cancel_client_check_restart(nua_client_request_t *cr, + int status, + char const *phrase, + sip_t const *sip); nua_client_methods_t const nua_cancel_client_methods = { SIP_METHOD_CANCEL, /* crm_method, crm_method_name */ @@ -1447,8 +1451,8 @@ nua_client_methods_t const nua_cancel_client_methods = { }, NULL, /* crm_template */ NULL, /* crm_init */ - nua_cancel_client_request, /* crm_send */ - NULL, /* crm_check_restart */ + nua_cancel_client_request, /* .. not really crm_send */ + nua_cancel_client_check_restart, /* crm_check_restart */ NULL, /* crm_recv */ NULL, /* crm_preliminary */ NULL, /* crm_report */ @@ -1488,6 +1492,16 @@ static int nua_cancel_client_request(nua_client_request_t *cr, return 0; } +static int +nua_cancel_client_check_restart(nua_client_request_t *cr, + int status, + char const *phrase, + sip_t const *sip) +{ + /* We cannot really restart CANCEL */ + return 0; +} + /** @NUA_EVENT nua_r_cancel * * Answer to outgoing CANCEL.