From: Alexei Gradinari Date: Thu, 18 Feb 2016 16:55:39 +0000 (-0500) Subject: res_pjsip_outbound_publish: Fix processing 412 response X-Git-Tag: 14.0.0-beta1~388^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14886643c669f8c154ee3ea646ffeffeddc91309;p=thirdparty%2Fasterisk.git res_pjsip_outbound_publish: Fix processing 412 response When Asterisk receives a 412 (Conditional Request Failed) response it has to recreate publish session. There is bug in res_pjsip_outbound_publish.c The function sip_outbound_publish_client_alloc is called with wrong object while processing 412 (Conditional Request Failed) response. This patch fixes it. ASTERISK-25229 #close Change-Id: I3b62f2debf6bb1e5817cde7b13ea39ef2bf14359 --- diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c index a58bcbb916..856d84a7ad 100644 --- a/res/res_pjsip_outbound_publish.c +++ b/res/res_pjsip_outbound_publish.c @@ -893,7 +893,7 @@ static void sip_outbound_publish_callback(struct pjsip_publishc_cbparam *param) pjsip_publishc_destroy(client->client); client->client = NULL; - if (sip_outbound_publish_client_alloc(publish)) { + if (sip_outbound_publish_client_alloc(client)) { ast_log(LOG_ERROR, "Failed to create a new outbound publish client for '%s' on 412 response\n", ast_sorcery_object_get_id(publish)); goto end;