From 12fb92ec0b244c65292ef618b7fd4b083b8c1084 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 20 Mar 2018 13:57:28 +0100 Subject: [PATCH] fix body of notify --- .../handlers/local-conference-list-event-handler.cpp | 6 +++--- src/content/content.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/conference/handlers/local-conference-list-event-handler.cpp b/src/conference/handlers/local-conference-list-event-handler.cpp index cf42999b7..98cdeb92f 100644 --- a/src/conference/handlers/local-conference-list-event-handler.cpp +++ b/src/conference/handlers/local-conference-list-event-handler.cpp @@ -131,10 +131,10 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con content.setBody(notifyBody); char token[17]; ostringstream os; - belle_sip_random_token(token, sizeof(token)); - os << "@sip.linphone.org"; - Address cid(os.str()); os.str(""); + belle_sip_random_token(token, sizeof(token)); + os << token << "@sip.linphone.org"; + Address cid(os.str()); content.addHeader("Content-Id", cid.asStringUriOnly()); contents.push_back(content); diff --git a/src/content/content.cpp b/src/content/content.cpp index ca13e6d18..9d38aa81e 100644 --- a/src/content/content.cpp +++ b/src/content/content.cpp @@ -228,7 +228,8 @@ const string &Content::getHeaderValue (const string &headerName) const { LinphoneContent *Content::toLinphoneContent () const { LinphoneContent *content = linphone_core_create_content(nullptr); linphone_content_set_type(content, getContentType().getType().c_str()); - linphone_content_set_subtype(content, getContentType().getSubType().c_str()); + string subtype = getContentType().getSubType() + getContentType().getParameter(); + linphone_content_set_subtype(content, subtype.c_str()); linphone_content_set_buffer(content, (const uint8_t *)getBodyAsUtf8String().c_str(), getBodyAsUtf8String().size()); return content; }