split linphone_gtk_iterate and fix bad enum casting in chat message handling

This commit is contained in:
Simon Morlat 2014-03-05 14:41:08 +01:00
parent 972659a1f9
commit 90b5d17172
3 changed files with 20 additions and 16 deletions

View file

@ -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);

View file

@ -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;
}
/**

View file

@ -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();