Commit 510440a1 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix crashes on BlackBerry 10.

parent e42391c4
......@@ -1874,7 +1874,7 @@ static void apply_user_agent(LinphoneCore *lc){
void linphone_core_set_user_agent(LinphoneCore *lc, const char *name, const char *ver){
#if USE_BELLESIP
char ua_string[256];
snprintf(ua_string, sizeof(ua_string) - 1, "%s/%s", name, ver);
snprintf(ua_string, sizeof(ua_string) - 1, "%s/%s", name?name:"", ver?ver:"");
if (lc->sal) {
sal_set_user_agent(lc->sal, ua_string);
sal_append_stack_string_to_user_agent(lc->sal);
......
......@@ -33,9 +33,11 @@ void text_message_received(LinphoneCore *lc, LinphoneChatRoom *room, const Linph
void message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage* message) {
char* from=linphone_address_as_string(linphone_chat_message_get_from(message));
stats* counters;
ms_message("Message from [%s] is [%s] , external URL [%s]",from
,linphone_chat_message_get_text(message)
,linphone_chat_message_get_external_body_url(message));
const char *text=linphone_chat_message_get_text(message);
const char *external_body_url=linphone_chat_message_get_external_body_url(message);
ms_message("Message from [%s] is [%s] , external URL [%s]",from?from:""
,text?text:""
,external_body_url?external_body_url:"");
ms_free(from);
counters = get_stats(lc);
counters->number_of_LinphoneMessageReceived++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment