From: Richard Mudgett Date: Fri, 21 Aug 2015 23:01:59 +0000 (-0500) Subject: res_pjsip_pubsub.c: Set dlg_status code instead of sending SIP response. X-Git-Tag: 14.0.0-beta1~691 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b290dfe2f2746698153961a9479877f8ead9844;p=thirdparty%2Fasterisk.git res_pjsip_pubsub.c: Set dlg_status code instead of sending SIP response. We should not try to send a SIP response message because we may be restoring a persistent subscription where we are not responding to a SIP request. Change-Id: Id89167ef90320c5563f37e632db0dda6cb9e7dec --- diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index 5997640341..802bb9ec3b 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -1263,7 +1263,7 @@ static struct sip_subscription_tree *create_subscription_tree(const struct ast_s sub_tree = allocate_subscription_tree(endpoint); if (!sub_tree) { - pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 500, NULL, NULL, NULL); + *dlg_status = PJ_ENOMEM; return NULL; } sub_tree->role = AST_SIP_NOTIFIER;