From df28cf94696d7b9272306ecbe8b2b8ce21b1b9ca Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Sat, 17 Mar 2018 11:51:16 +0100 Subject: [PATCH] generate random token for identifying a part in the notify body --- .../handlers/local-conference-list-event-handler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/conference/handlers/local-conference-list-event-handler.cpp b/src/conference/handlers/local-conference-list-event-handler.cpp index d244733a0..a2ddee5ea 100644 --- a/src/conference/handlers/local-conference-list-event-handler.cpp +++ b/src/conference/handlers/local-conference-list-event-handler.cpp @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "belle-sip/utils.h" #include "linphone/utils/utils.h" #include "address/address.h" @@ -74,7 +75,13 @@ void LocalConferenceListEventHandler::subscribeReceived (const string &xmlBody) content.setContentType(ContentType::ConferenceInfo); content.setBody(notifyBody); - content.addHeader("Content-Id", addr.asStringUriOnly()); + char token[17]; + ostringstream os; + belle_sip_random_token(token, sizeof(token)); + os << "@sip.linphone.org"; + Address cid(os.str()); + os.str(""); + content.addHeader("Content-Id", cid.asStringUriOnly()); contents.push_back(content); // Add entry into the rlmi content of the notify body