mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
split linphone_gtk_iterate and fix bad enum casting in chat message handling
This commit is contained in:
parent
972659a1f9
commit
90b5d17172
3 changed files with 20 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
32
gtk/main.c
32
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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue