From 0945515d6c4e50959537473e801f8c545870f543 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 26 Mar 2018 15:40:51 +0200 Subject: [PATCH] Fix unreliability with custom header handling. (retrofit of commit 384669 from master branch) --- src/sal/sal.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sal/sal.cpp b/src/sal/sal.cpp index 3346ab05e..a25236587 100644 --- a/src/sal/sal.cpp +++ b/src/sal/sal.cpp @@ -218,11 +218,14 @@ void Sal::process_request_event_cb (void *ud, const belle_sip_request_event_t *e if (!op->call_id) { op->call_id=ms_strdup(belle_sip_header_call_id_get_call_id(BELLE_SIP_HEADER_CALL_ID(belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req), belle_sip_header_call_id_t)))); } - /*It is worth noting that proxies can (and - will) remove this header field*/ + /*It is worth noting that proxies can (and will) remove this header field*/ op->set_privacy_from_message((belle_sip_message_t*)req); - - op->assign_recv_headers((belle_sip_message_t*)req); + + if (strcmp("ACK",method) != 0){ + /*The ACK custom header is processed specifically later on*/ + op->assign_recv_headers((belle_sip_message_t*)req); + } + if (op->callbacks && op->callbacks->process_request_event) { op->callbacks->process_request_event(op,event); } else {