diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 55685af59..539341b60 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -1034,7 +1034,7 @@ static void text_delivery_update(SalOp *op, SalTextDeliveryStatus status, SalRea calls = linphone_core_get_calls(chat_msg->chat_room->lc); chat_msg->state=chatStatusSal2Linphone(status); - chat_msg->reason=reason; + chat_msg->reason=linphone_reason_from_sal(reason); linphone_chat_message_store_state(chat_msg); if (chat_msg && chat_msg->cb) { ms_message("Notifying text delivery with status %i",chat_msg->state); diff --git a/coreapi/chat.c b/coreapi/chat.c index 39003fbbf..82e05fdaf 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -791,7 +791,7 @@ void linphone_chat_message_destroy(LinphoneChatMessage* msg) { LinphoneReason linphone_chat_message_get_reason(LinphoneChatMessage* msg) { - return linphone_reason_from_sal(msg->reason); + return msg->reason; } /** diff --git a/gtk/main.c b/gtk/main.c index 9f897eb1d..0cdbf0a60 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -603,23 +603,10 @@ static void update_video_title(){ video_needs_update=TRUE; } -static gboolean linphone_gtk_iterate(LinphoneCore *lc){ - static gboolean first_time=TRUE; +static void update_video_titles(LinphoneCore *lc){ unsigned long id; static unsigned long previd=0; static unsigned long preview_previd=0; - static gboolean in_iterate=FALSE; - - /*avoid reentrancy*/ - if (in_iterate) return TRUE; - in_iterate=TRUE; - linphone_core_iterate(lc); - if (first_time){ - /*after the first call to iterate, SipSetupContexts should be ready, so take actions:*/ - linphone_gtk_show_directory_search(); - first_time=FALSE; - } - id=linphone_core_get_native_video_window_id(lc); if (id!=previd || video_needs_update){ GdkWindow *w; @@ -658,6 +645,23 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){ if (video_needs_update) video_needs_update=FALSE; } } +} + +static gboolean linphone_gtk_iterate(LinphoneCore *lc){ + static gboolean first_time=TRUE; + static gboolean in_iterate=FALSE; + + /*avoid reentrancy*/ + if (in_iterate) return TRUE; + in_iterate=TRUE; + linphone_core_iterate(lc); + if (first_time){ + /*after the first call to iterate, SipSetupContexts should be ready, so take actions:*/ + linphone_gtk_show_directory_search(); + first_time=FALSE; + } + + update_video_titles(lc); if (addr_to_call!=NULL){ /*make sure we are not showing the login screen*/ GtkWidget *mw=linphone_gtk_get_main_window();