Fix some other deprecation warnings.

This commit is contained in:
Ghislain MARY 2016-03-10 18:19:24 +01:00
parent 5baf4362f0
commit 05adaae843
2 changed files with 10 additions and 4 deletions

View file

@ -65,11 +65,13 @@ static void message_forking(void) {
MSList* lcs=ms_list_append(NULL,marie->lc); MSList* lcs=ms_list_append(NULL,marie->lc);
LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity); LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu"); LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(message);
lcs=ms_list_append(lcs,pauline->lc); lcs=ms_list_append(lcs,pauline->lc);
lcs=ms_list_append(lcs,marie2->lc); lcs=ms_list_append(lcs,marie2->lc);
linphone_chat_room_send_message2(chat_room,message,liblinphone_tester_chat_message_state_change,pauline->lc); linphone_chat_message_cbs_set_msg_state_changed(cbs, liblinphone_tester_chat_message_msg_state_changed);
linphone_chat_room_send_chat_message(chat_room, message);
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneMessageReceived,1,3000)); BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneMessageReceived,1,3000));
BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneMessageReceived,1,1000)); BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneMessageReceived,1,1000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageDelivered,1,1000)); BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageDelivered,1,1000));
@ -93,6 +95,7 @@ static void message_forking_with_unreachable_recipients(void) {
MSList* lcs=ms_list_append(NULL,marie->lc); MSList* lcs=ms_list_append(NULL,marie->lc);
LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity); LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu"); LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(message);
lcs=ms_list_append(lcs,pauline->lc); lcs=ms_list_append(lcs,pauline->lc);
lcs=ms_list_append(lcs,marie2->lc); lcs=ms_list_append(lcs,marie2->lc);
@ -109,7 +112,8 @@ static void message_forking_with_unreachable_recipients(void) {
linphone_core_set_network_reachable(marie2->lc,FALSE); linphone_core_set_network_reachable(marie2->lc,FALSE);
linphone_core_set_network_reachable(marie3->lc,FALSE); linphone_core_set_network_reachable(marie3->lc,FALSE);
linphone_chat_room_send_message2(chat_room,message,liblinphone_tester_chat_message_state_change,pauline->lc); linphone_chat_message_cbs_set_msg_state_changed(cbs, liblinphone_tester_chat_message_msg_state_changed);
linphone_chat_room_send_chat_message(chat_room, message);
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneMessageReceived,1,3000)); BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneMessageReceived,1,3000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageDelivered,1,1000)); BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageDelivered,1,1000));
BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,1, int, "%d"); BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,1, int, "%d");
@ -141,6 +145,7 @@ static void message_forking_with_all_recipients_unreachable(void) {
MSList* lcs=ms_list_append(NULL,marie->lc); MSList* lcs=ms_list_append(NULL,marie->lc);
LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity); LinphoneChatRoom* chat_room = linphone_core_get_chat_room(pauline->lc, marie->identity);
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu"); LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(message);
lcs=ms_list_append(lcs,pauline->lc); lcs=ms_list_append(lcs,pauline->lc);
lcs=ms_list_append(lcs,marie2->lc); lcs=ms_list_append(lcs,marie2->lc);
@ -159,7 +164,8 @@ static void message_forking_with_all_recipients_unreachable(void) {
linphone_core_set_network_reachable(marie2->lc,FALSE); linphone_core_set_network_reachable(marie2->lc,FALSE);
linphone_core_set_network_reachable(marie3->lc,FALSE); linphone_core_set_network_reachable(marie3->lc,FALSE);
linphone_chat_room_send_message2(chat_room,message,liblinphone_tester_chat_message_state_change,pauline->lc); linphone_chat_message_cbs_set_msg_state_changed(cbs, liblinphone_tester_chat_message_msg_state_changed);
linphone_chat_room_send_chat_message(chat_room, message);
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageInProgress,1,5000)); BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageInProgress,1,5000));
/*flexisip will accept the message with 202 after 16 seconds*/ /*flexisip will accept the message with 202 after 16 seconds*/

View file

@ -522,7 +522,7 @@ static void transfer_message_download_cancelled(void) {
/* create a chatroom on pauline's side */ /* create a chatroom on pauline's side */
chat_room = linphone_core_get_chat_room(pauline->lc,marie->identity); chat_room = linphone_core_get_chat_room(pauline->lc,marie->identity);
msg = create_message_from_nowebcam(chat_room); msg = create_message_from_nowebcam(chat_room);
linphone_chat_room_send_message2(chat_room,msg,NULL,pauline->lc); linphone_chat_room_send_chat_message(chat_room,msg);
/* wait for marie to receive pauline's msg */ /* wait for marie to receive pauline's msg */
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceivedWithFile,1)); BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceivedWithFile,1));