diff --git a/coreapi/bellesip_sal/sal_sdp.c b/coreapi/bellesip_sal/sal_sdp.c index ab3478fb6..9cd5a5ed8 100644 --- a/coreapi/bellesip_sal/sal_sdp.c +++ b/coreapi/bellesip_sal/sal_sdp.c @@ -486,7 +486,7 @@ static void sdp_parse_payload_types(belle_sdp_media_description_t *media_desc, S static void sdp_parse_media_crypto_parameters(belle_sdp_media_description_t *media_desc, SalStreamDescription *stream) { belle_sip_list_t *attribute_it; belle_sdp_attribute_t *attribute; - char tmp[256], tmp2[256], parameters[256]={0}; + char tmp[257], tmp2[257], parameters[257]={0}; int valid_count = 0; int nb; diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index fda0b9c59..16d841340 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2246,7 +2246,9 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig // We need the Sal on the Android platform helper init msplugins_dir = linphone_factory_get_msplugins_dir(lfactory); image_resources_dir = linphone_factory_get_image_resources_dir(lfactory); + lc->sal=new Sal(NULL); + lc->sal->set_refresher_retry_after(lp_config_get_int(lc->config, "sip", "refresher_retry_after", 60000)); lc->sal->set_http_proxy_host(linphone_core_get_http_proxy_host(lc)); lc->sal->set_http_proxy_port(linphone_core_get_http_proxy_port(lc)); diff --git a/src/chat/chat-message/chat-message.cpp b/src/chat/chat-message/chat-message.cpp index f2ec811fe..5b42d589c 100644 --- a/src/chat/chat-message/chat-message.cpp +++ b/src/chat/chat-message/chat-message.cpp @@ -608,7 +608,9 @@ LinphoneReason ChatMessagePrivate::receive () { if (errorCode <= 0) { bool foundSupportContentType = false; for (Content *c : contents) { - if (linphone_core_is_content_type_supported(core->getCCore(), c->getContentType().asString().c_str())) { + ContentType ct(c->getContentType()); + ct.cleanParameters(); + if (linphone_core_is_content_type_supported(core->getCCore(), ct.asString().c_str())) { foundSupportContentType = true; break; } else diff --git a/src/chat/chat-room/chat-room.cpp b/src/chat/chat-room/chat-room.cpp index b0b86553f..72705d157 100644 --- a/src/chat/chat-room/chat-room.cpp +++ b/src/chat/chat-room/chat-room.cpp @@ -194,7 +194,7 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag ); Content content; - if (message->url && (ContentType(message->content_type) == ContentType::ExternalBody)) { + if (message->url && (ContentType(message->content_type).weakEqual(ContentType::ExternalBody))) { lInfo() << "Received a message with an external body URL " << message->url; content.setContentType(ContentType::FileTransfer); content.setBody(msg->getPrivate()->createFakeFileTransferFromUrl(message->url)); diff --git a/src/chat/cpim/parser/cpim-parser.cpp b/src/chat/cpim/parser/cpim-parser.cpp index d3beb28d2..ce8e3d5a4 100644 --- a/src/chat/cpim/parser/cpim-parser.cpp +++ b/src/chat/cpim/parser/cpim-parser.cpp @@ -237,17 +237,17 @@ public: Cpim::Parser::Parser () : Singleton(*new ParserPrivate) { L_D(); -#if TARGET_OS_IPHONE - CFBundleRef bundle = CFBundleGetBundleWithIdentifier( CFSTR("org.linphone.linphone") ); - CFURLRef grammar_url = CFBundleCopyResourceURL(bundle, CFSTR(CPIM_GRAMMAR), NULL, NULL); - CFStringRef grammar_path = CFURLCopyFileSystemPath(grammar_url, kCFURLPOSIXPathStyle); - CFStringEncoding encoding_method = CFStringGetSystemEncoding(); - const char *path = CFStringGetCStringPtr(grammar_path, encoding_method); - CFRelease(grammar_url); - CFRelease(grammar_path); -#else - const char *path = CPIM_GRAMMAR; -#endif + #if TARGET_OS_IPHONE + CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("org.linphone.linphone")); + CFURLRef grammarUrl = CFBundleCopyResourceURL(bundle, CFSTR(CPIM_GRAMMAR), nullptr, nullptr); + CFStringRef grammarPath = CFURLCopyFileSystemPath(grammarUrl, kCFURLPOSIXPathStyle); + CFStringEncoding encodingMethod = CFStringGetSystemEncoding(); + const char *path = CFStringGetCStringPtr(grammarPath, encodingMethod); + CFRelease(grammarUrl); + CFRelease(grammarPath); + #else + const char *path = CPIM_GRAMMAR; + #endif d->grammar = belr::GrammarLoader::get().load(path); if (!d->grammar) lFatal() << "Unable to load CPIM grammar."; diff --git a/src/content/file-transfer-content.cpp b/src/content/file-transfer-content.cpp index e2fe5ab4f..2b8e228bb 100644 --- a/src/content/file-transfer-content.cpp +++ b/src/content/file-transfer-content.cpp @@ -43,7 +43,9 @@ public: // ----------------------------------------------------------------------------- -FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {} +FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) { + setContentType(ContentType::FileTransfer); +} FileTransferContent::FileTransferContent (const FileTransferContent &other) : Content(*new FileTransferContentPrivate) { L_D();