From 24c2a4cf87ca5566854ee92608f87b42ebf6faf5 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 21 Sep 2017 17:30:03 +0200 Subject: [PATCH] Fix build of linphonec, linphone-daemon and testers. --- console/commands.c | 2 +- console/linphonec.c | 14 +++---- coreapi/private.h | 2 + coreapi/proxy.c | 2 +- daemon/daemon.cc | 14 +++---- include/linphone/call.h | 2 + src/c-wrapper/api/c-call-stats.cpp | 8 ++++ tester/call_single_tester.c | 66 +++++++++++++++--------------- tester/tester.c | 14 +++---- 9 files changed, 68 insertions(+), 56 deletions(-) diff --git a/console/commands.c b/console/commands.c index e5b62d683..cd178daed 100644 --- a/console/commands.c +++ b/console/commands.c @@ -2492,7 +2492,7 @@ static void lpc_display_call_states(LinphoneCore *lc){ tmp=linphone_call_get_remote_address_as_string (call); flag=in_conference ? "conferencing" : ""; flag=linphone_call_has_transfer_pending(call) ? "transfer pending" : flag; - linphonec_out("%-2i | %-35s | %-15s | %s\n",VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)), + linphonec_out("%-2i | %-35s | %-15s | %s\n",VOIDPTR_TO_INT(linphone_call_get_user_data(call)), tmp,linphone_call_state_to_string(linphone_call_get_state(call))+strlen("LinphoneCall"),flag); ms_free(tmp); } diff --git a/console/linphonec.c b/console/linphonec.c index 8b1fe317b..28124a53f 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -175,7 +175,7 @@ bool_t linphonec_camera_enabled=TRUE; void linphonec_call_identify(LinphoneCall* call){ static int callid=1; - linphone_call_set_user_pointer (call,INT_TO_VOIDPTR(callid)); + linphone_call_set_user_data (call,INT_TO_VOIDPTR(callid)); callid++; } @@ -183,7 +183,7 @@ LinphoneCall *linphonec_get_call(int id){ const MSList *elem=linphone_core_get_calls(linphonec); for (;elem!=NULL;elem=elem->next){ LinphoneCall *call=(LinphoneCall*)elem->data; - if (VOIDPTR_TO_INT(linphone_call_get_user_pointer(call))==id){ + if (VOIDPTR_TO_INT(linphone_call_get_user_data(call))==id){ return call; } } @@ -279,7 +279,7 @@ linphonec_transfer_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneC char *remote=linphone_call_get_remote_address_as_string(call); if (new_call_state==LinphoneCallConnected){ linphonec_out("The distant endpoint %s of call %i has been transfered, you can safely close the call.\n", - remote,VOIDPTR_TO_INT(linphone_call_get_user_pointer(call))); + remote,VOIDPTR_TO_INT(linphone_call_get_user_data(call))); } ms_free(remote); } @@ -322,7 +322,7 @@ static void linphonec_call_updated(LinphoneCall *call){ } static void linphonec_call_encryption_changed(LinphoneCore *lc, LinphoneCall *call, bool_t encrypted, const char *auth_token) { - int id=VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)); + int id=VOIDPTR_TO_INT(linphone_call_get_user_data(call)); if (!encrypted) { linphonec_out("Call %i is not fully encrypted and auth token is %s.\n", id, (auth_token != NULL) ? auth_token : "absent"); @@ -334,7 +334,7 @@ static void linphonec_call_encryption_changed(LinphoneCore *lc, LinphoneCall *ca static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState st, const char *msg){ char *from=linphone_call_get_remote_address_as_string(call); - int id=VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)); + int id=VOIDPTR_TO_INT(linphone_call_get_user_data(call)); switch(st){ case LinphoneCallEnd: linphonec_out("Call %i with %s ended (%s).\n", id, from, linphone_reason_to_string(linphone_call_get_reason(call))); @@ -357,7 +357,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L case LinphoneCallIncomingReceived: linphonec_call_identify(call); linphone_call_enable_camera (call,linphonec_camera_enabled); - id=VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)); + id=VOIDPTR_TO_INT(linphone_call_get_user_data(call)); linphonec_set_caller(from); linphonec_out("Receiving new incoming call from %s, assigned id %i\n", from,id); if ( auto_answer) { @@ -373,7 +373,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L break; case LinphoneCallOutgoingInit: linphonec_call_identify(call); - id=VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)); + id=VOIDPTR_TO_INT(linphone_call_get_user_data(call)); linphonec_out("Establishing call id to %s, assigned id %i\n", from,id); break; case LinphoneCallUpdatedByRemote: diff --git a/coreapi/private.h b/coreapi/private.h index fab87f38f..e31361ed1 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -409,6 +409,7 @@ void _linphone_call_stats_uninit(LinphoneCallStats *stats); void _linphone_call_stats_clone(LinphoneCallStats *dst, const LinphoneCallStats *src); void _linphone_call_stats_set_ice_state (LinphoneCallStats *stats, LinphoneIceState state); void _linphone_call_stats_set_type (LinphoneCallStats *stats, LinphoneStreamType type); +mblk_t *_linphone_call_stats_get_received_rtcp (const LinphoneCallStats *stats); void _linphone_call_stats_set_received_rtcp (LinphoneCallStats *stats, mblk_t *m); void _linphone_call_stats_set_sent_rtcp (LinphoneCallStats *stats, mblk_t *m); int _linphone_call_stats_get_updated (const LinphoneCallStats *stats); @@ -419,6 +420,7 @@ void _linphone_call_stats_set_upload_bandwidth (LinphoneCallStats *stats, float void _linphone_call_stats_set_rtcp_download_bandwidth (LinphoneCallStats *stats, float bandwidth); void _linphone_call_stats_set_rtcp_upload_bandwidth (LinphoneCallStats *stats, float bandwidth); void _linphone_call_stats_set_ip_family_of_remote (LinphoneCallStats *stats, LinphoneAddressFamily family); +bool_t _linphone_call_stats_rtcp_received_via_mux (const LinphoneCallStats *stats); void linphone_call_update_local_media_description_from_ice_or_upnp(LinphoneCall *call); void linphone_call_update_ice_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md, bool_t is_offer); void linphone_call_clear_unused_ice_candidates(LinphoneCall *call, const SalMediaDescription *md); diff --git a/coreapi/proxy.c b/coreapi/proxy.c index ce6d4aa21..c56877c2f 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -119,7 +119,7 @@ static void linphone_proxy_config_init(LinphoneCore* lc, LinphoneProxyConfig *cf cfg->reg_sendregister = lc ? !!lp_config_get_default_int(lc->config, "proxy", "reg_sendregister", 1) : 1; cfg->dial_prefix = dial_prefix ? ms_strdup(dial_prefix) : NULL; cfg->dial_escape_plus = lc ? !!lp_config_get_default_int(lc->config, "proxy", "dial_escape_plus", 0) : 0; - cfg->privacy = lc ? (LinphonePrivacyMask)lp_config_get_default_int(lc->config, "proxy", "privacy", LinphonePrivacyDefault) : LinphonePrivacyDefault; + cfg->privacy = lc ? (LinphonePrivacyMask)lp_config_get_default_int(lc->config, "proxy", "privacy", LinphonePrivacyDefault) : (LinphonePrivacyMask)LinphonePrivacyDefault; cfg->identity_address = identity ? linphone_address_new(identity) : NULL; cfg->reg_identity = cfg->identity_address ? linphone_address_as_string(cfg->identity_address) : NULL; cfg->reg_proxy = proxy ? ms_strdup(proxy) : NULL; diff --git a/daemon/daemon.cc b/daemon/daemon.cc index 907972976..af2474cb8 100644 --- a/daemon/daemon.cc +++ b/daemon/daemon.cc @@ -166,19 +166,19 @@ CallStatsResponse::CallStatsResponse(Daemon *daemon, LinphoneCall *call, const L ostr << "Event-type: call-stats\n"; ostr << "Id: " << daemon->updateCallId(call) << "\n"; ostr << "Type: "; - if (stats->type == LINPHONE_CALL_STATS_AUDIO) { + if (linphone_call_stats_get_type(stats) == LINPHONE_CALL_STATS_AUDIO) { ostr << "Audio"; } else { ostr << "Video"; } ostr << "\n"; } else { - prefix = ((stats->type == LINPHONE_CALL_STATS_AUDIO) ? "Audio-" : "Video-"); + prefix = ((linphone_call_stats_get_type(stats) == LINPHONE_CALL_STATS_AUDIO) ? "Audio-" : "Video-"); } printCallStatsHelper(ostr, stats, prefix); - if (stats->type == LINPHONE_CALL_STATS_AUDIO) { + if (linphone_call_stats_get_type(stats) == LINPHONE_CALL_STATS_AUDIO) { const PayloadType *audioCodec = linphone_call_params_get_used_audio_codec(callParams); ostr << PayloadTypeResponse(linphone_call_get_core(call), audioCodec, -1, prefix, false).getBody() << "\n"; } else { @@ -353,9 +353,9 @@ LinphoneSoundDaemon *Daemon::getLSD() { } int Daemon::updateCallId(LinphoneCall *call) { - int val = VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)); + int val = VOIDPTR_TO_INT(linphone_call_get_user_data(call)); if (val == 0) { - linphone_call_set_user_pointer(call, INT_TO_VOIDPTR(++mCallIds)); + linphone_call_set_user_data(call, INT_TO_VOIDPTR(++mCallIds)); return mCallIds; } return val; @@ -365,7 +365,7 @@ LinphoneCall *Daemon::findCall(int id) { const bctbx_list_t *elem = linphone_core_get_calls(mLc); for (; elem != NULL; elem = elem->next) { LinphoneCall *call = (LinphoneCall *) elem->data; - if (VOIDPTR_TO_INT(linphone_call_get_user_pointer(call)) == id) + if (VOIDPTR_TO_INT(linphone_call_get_user_data(call)) == id) return call; } return NULL; @@ -518,7 +518,7 @@ void Daemon::callStateChanged(LinphoneCall *call, LinphoneCallState state, const void Daemon::callStatsUpdated(LinphoneCall *call, const LinphoneCallStats *stats) { if (mUseStatsEvents) { /* don't queue periodical updates (3 per seconds for just bandwidth updates) */ - if (!(stats->updated & LINPHONE_CALL_STATS_PERIODICAL_UPDATE)){ + if (!(_linphone_call_stats_get_updated(stats) & LINPHONE_CALL_STATS_PERIODICAL_UPDATE)){ mEventQueue.push(new CallStatsResponse(this, call, stats, true)); } } diff --git a/include/linphone/call.h b/include/linphone/call.h index 9446df88e..990d2b360 100644 --- a/include/linphone/call.h +++ b/include/linphone/call.h @@ -21,5 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define LINPHONE_CALL_H #include "linphone/api/c-call.h" +#include "linphone/api/c-call-cbs.h" +#include "linphone/api/c-call-stats.h" #endif /* LINPHONE_CALL_H */ diff --git a/src/c-wrapper/api/c-call-stats.cpp b/src/c-wrapper/api/c-call-stats.cpp index e639862e7..aa63cd2fd 100644 --- a/src/c-wrapper/api/c-call-stats.cpp +++ b/src/c-wrapper/api/c-call-stats.cpp @@ -106,6 +106,10 @@ void _linphone_call_stats_set_type (LinphoneCallStats *stats, LinphoneStreamType stats->type = type; } +mblk_t *_linphone_call_stats_get_received_rtcp (const LinphoneCallStats *stats) { + return stats->received_rtcp; +} + void _linphone_call_stats_set_received_rtcp (LinphoneCallStats *stats, mblk_t *m) { stats->received_rtcp = m; } @@ -146,6 +150,10 @@ void _linphone_call_stats_set_ip_family_of_remote (LinphoneCallStats *stats, Lin stats->rtp_remote_family = family; } +bool_t _linphone_call_stats_rtcp_received_via_mux (const LinphoneCallStats *stats) { + return stats->rtcp_received_via_mux; +} + // ============================================================================= // Public functions // ============================================================================= diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c index 472b2072a..cf7f0969c 100644 --- a/tester/call_single_tester.c +++ b/tester/call_single_tester.c @@ -101,28 +101,28 @@ static void rtcp_received(stats* counters, mblk_t *packet) { void call_stats_updated(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallStats *lstats) { stats* counters = get_stats(lc); counters->number_of_LinphoneCallStatsUpdated++; - if (lstats->updated & LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE) { + if (_linphone_call_stats_get_updated(lstats) & LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE) { counters->number_of_rtcp_received++; - if (lstats->rtcp_received_via_mux){ + if (_linphone_call_stats_rtcp_received_via_mux(lstats)){ counters->number_of_rtcp_received_via_mux++; } - rtcp_received(counters, lstats->received_rtcp); + rtcp_received(counters, _linphone_call_stats_get_received_rtcp(lstats)); } - if (lstats->updated & LINPHONE_CALL_STATS_SENT_RTCP_UPDATE ) { + if (_linphone_call_stats_get_updated(lstats) & LINPHONE_CALL_STATS_SENT_RTCP_UPDATE ) { counters->number_of_rtcp_sent++; } - if (lstats->updated & LINPHONE_CALL_STATS_PERIODICAL_UPDATE ) { + if (_linphone_call_stats_get_updated(lstats) & LINPHONE_CALL_STATS_PERIODICAL_UPDATE ) { int tab_size = sizeof (counters->audio_download_bandwidth)/sizeof(int); - int index = (counters->current_bandwidth_index[lstats->type]++) % tab_size; + int index = (counters->current_bandwidth_index[linphone_call_stats_get_type(lstats)]++) % tab_size; LinphoneCallStats *audio_stats, *video_stats; audio_stats = linphone_call_get_audio_stats(call); video_stats = linphone_call_get_video_stats(call); - if (lstats->type == LINPHONE_CALL_STATS_AUDIO) { - counters->audio_download_bandwidth[index] = (int)audio_stats->download_bandwidth; - counters->audio_upload_bandwidth[index] = (int)audio_stats->upload_bandwidth; + if (linphone_call_stats_get_type(lstats) == LINPHONE_CALL_STATS_AUDIO) { + counters->audio_download_bandwidth[index] = (int)linphone_call_stats_get_download_bandwidth(audio_stats); + counters->audio_upload_bandwidth[index] = (int)linphone_call_stats_get_upload_bandwidth(audio_stats); } else { - counters->video_download_bandwidth[index] = (int)video_stats->download_bandwidth; - counters->video_upload_bandwidth[index] = (int)video_stats->upload_bandwidth; + counters->video_download_bandwidth[index] = (int)linphone_call_stats_get_download_bandwidth(video_stats); + counters->video_upload_bandwidth[index] = (int)linphone_call_stats_get_upload_bandwidth(video_stats); } linphone_call_stats_unref(audio_stats); linphone_call_stats_unref(video_stats); @@ -207,10 +207,10 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana video_stats1 = linphone_call_get_video_stats(c1); audio_stats2 = linphone_call_get_audio_stats(c2); video_stats2 = linphone_call_get_video_stats(c2); - if (audio_stats1->round_trip_delay > 0.0 - && audio_stats2->round_trip_delay > 0.0 - && (!linphone_call_log_video_enabled(linphone_call_get_call_log(c1)) || video_stats1->round_trip_delay>0.0) - && (!linphone_call_log_video_enabled(linphone_call_get_call_log(c2)) || video_stats2->round_trip_delay>0.0)) { + if (linphone_call_stats_get_round_trip_delay(audio_stats1) > 0.0 + && linphone_call_stats_get_round_trip_delay(audio_stats2) > 0.0 + && (!linphone_call_log_video_enabled(linphone_call_get_call_log(c1)) || linphone_call_stats_get_round_trip_delay(video_stats1)>0.0) + && (!linphone_call_log_video_enabled(linphone_call_get_call_log(c2)) || linphone_call_stats_get_round_trip_delay(video_stats2)>0.0)) { break; } @@ -228,33 +228,33 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana if (linphone_core_rtcp_enabled(caller->lc) && linphone_core_rtcp_enabled(callee->lc)) { BC_ASSERT_GREATER(caller->stat.number_of_rtcp_received, 1, int, "%i"); BC_ASSERT_GREATER(callee->stat.number_of_rtcp_received, 1, int, "%i"); - BC_ASSERT_GREATER(audio_stats1->round_trip_delay,0.0,float,"%f"); - BC_ASSERT_GREATER(audio_stats2->round_trip_delay,0.0,float,"%f"); + BC_ASSERT_GREATER(linphone_call_stats_get_round_trip_delay(audio_stats1),0.0,float,"%f"); + BC_ASSERT_GREATER(linphone_call_stats_get_round_trip_delay(audio_stats2),0.0,float,"%f"); if (linphone_call_log_video_enabled(linphone_call_get_call_log(c1))) { - BC_ASSERT_GREATER(video_stats1->round_trip_delay,0.0,float,"%f"); + BC_ASSERT_GREATER(linphone_call_stats_get_round_trip_delay(video_stats1),0.0,float,"%f"); } if (linphone_call_log_video_enabled(linphone_call_get_call_log(c2))) { - BC_ASSERT_GREATER(video_stats2->round_trip_delay,0.0,float,"%f"); + BC_ASSERT_GREATER(linphone_call_stats_get_round_trip_delay(video_stats2),0.0,float,"%f"); } } else { if (linphone_core_rtcp_enabled(caller->lc)) { - BC_ASSERT_EQUAL(audio_stats1->rtp_stats.sent_rtcp_packets, 0, unsigned long long, "%llu"); - BC_ASSERT_EQUAL(audio_stats2->rtp_stats.recv_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(audio_stats1)->sent_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(audio_stats2)->recv_rtcp_packets, 0, unsigned long long, "%llu"); if (linphone_call_log_video_enabled(linphone_call_get_call_log(c1))) { - BC_ASSERT_EQUAL(video_stats1->rtp_stats.sent_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(video_stats1)->sent_rtcp_packets, 0, unsigned long long, "%llu"); } if (linphone_call_log_video_enabled(linphone_call_get_call_log(c2))) { - BC_ASSERT_EQUAL(video_stats2->rtp_stats.recv_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(video_stats2)->recv_rtcp_packets, 0, unsigned long long, "%llu"); } } if (linphone_core_rtcp_enabled(callee->lc)) { - BC_ASSERT_EQUAL(audio_stats2->rtp_stats.sent_rtcp_packets, 0, unsigned long long, "%llu"); - BC_ASSERT_EQUAL(audio_stats1->rtp_stats.recv_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(audio_stats2)->sent_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(audio_stats1)->recv_rtcp_packets, 0, unsigned long long, "%llu"); if (linphone_call_log_video_enabled(linphone_call_get_call_log(c1))) { - BC_ASSERT_EQUAL(video_stats1->rtp_stats.recv_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(video_stats1)->recv_rtcp_packets, 0, unsigned long long, "%llu"); } if (linphone_call_log_video_enabled(linphone_call_get_call_log(c2))) { - BC_ASSERT_EQUAL(video_stats2->rtp_stats.sent_rtcp_packets, 0, unsigned long long, "%llu"); + BC_ASSERT_EQUAL(linphone_call_stats_get_rtp_stats(video_stats2)->sent_rtcp_packets, 0, unsigned long long, "%llu"); } } @@ -3622,14 +3622,14 @@ void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, bctbx_l } switch (video_dir) { case LinphoneMediaDirectionInactive: - BC_ASSERT_LOWER((int)stats->upload_bandwidth, 5, int, "%i"); + BC_ASSERT_LOWER((int)linphone_call_stats_get_upload_bandwidth(stats), 5, int, "%i"); break; case LinphoneMediaDirectionSendOnly: expected_recv_iframe = 0; - BC_ASSERT_LOWER((int)stats->download_bandwidth, 5, int, "%i"); + BC_ASSERT_LOWER((int)linphone_call_stats_get_download_bandwidth(stats), 5, int, "%i"); break; case LinphoneMediaDirectionRecvOnly: - BC_ASSERT_LOWER((int)stats->upload_bandwidth, 5, int, "%i"); + BC_ASSERT_LOWER((int)linphone_call_stats_get_upload_bandwidth(stats), 5, int, "%i"); BCTBX_NO_BREAK; /*intentionally no break*/ case LinphoneMediaDirectionSendRecv: expected_recv_iframe = 1; @@ -4018,7 +4018,7 @@ static void call_with_paused_no_sdp_on_resume(void) { wait_for_until(marie->lc, pauline->lc, &dummy, 1, 3000); BC_ASSERT_GREATER(linphone_core_manager_get_max_audio_down_bw(marie),70,int,"%i"); stats = linphone_call_get_audio_stats(linphone_core_get_current_call(pauline->lc)); - BC_ASSERT_TRUE(stats->download_bandwidth>70); + BC_ASSERT_TRUE(linphone_call_stats_get_download_bandwidth(stats)>70); linphone_call_stats_unref(stats); end_call(marie,pauline); end: @@ -5952,8 +5952,8 @@ static void call_with_encryption_mandatory(bool_t caller_has_encryption_mandator /*however we can trust packet_recv from the other party instead */ marie_stats = linphone_call_get_audio_stats(linphone_core_get_current_call(marie->lc)); pauline_stats = linphone_call_get_audio_stats(linphone_core_get_current_call(pauline->lc)); - BC_ASSERT_EQUAL((int)marie_stats->rtp_stats.packet_recv, 0, int, "%i"); - BC_ASSERT_EQUAL((int)pauline_stats->rtp_stats.packet_recv, 0, int, "%i"); + BC_ASSERT_EQUAL((int)linphone_call_stats_get_rtp_stats(marie_stats)->packet_recv, 0, int, "%i"); + BC_ASSERT_EQUAL((int)linphone_call_stats_get_rtp_stats(pauline_stats)->packet_recv, 0, int, "%i"); linphone_call_stats_unref(marie_stats); linphone_call_stats_unref(pauline_stats); end_call(marie, pauline); diff --git a/tester/tester.c b/tester/tester.c index 02771dde2..1f8f94288 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -699,7 +699,7 @@ static void check_ice_from_rtp(LinphoneCall *c1, LinphoneCall *c2, LinphoneStrea } stats = linphone_call_get_audio_stats(c1); - if (stats->ice_state == LinphoneIceStateHostConnection && media_stream_started(ms)) { + if (linphone_call_stats_get_ice_state(stats) == LinphoneIceStateHostConnection && media_stream_started(ms)) { struct sockaddr_storage remaddr; socklen_t remaddrlen = sizeof(remaddr); char ip[NI_MAXHOST] = { 0 }; @@ -758,8 +758,8 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph if ((c1 != NULL) && (c2 != NULL)) { LinphoneCallStats *stats1 = linphone_call_get_audio_stats(c1); LinphoneCallStats *stats2 = linphone_call_get_audio_stats(c2); - if (stats1->ice_state==state && - stats2->ice_state==state){ + if (linphone_call_stats_get_ice_state(stats1)==state && + linphone_call_stats_get_ice_state(stats2)==state){ audio_success=TRUE; check_ice_from_rtp(c1,c2,LinphoneStreamTypeAudio); check_ice_from_rtp(c2,c1,LinphoneStreamTypeAudio); @@ -780,8 +780,8 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph if ((c1 != NULL) && (c2 != NULL)) { LinphoneCallStats *stats1 = linphone_call_get_video_stats(c1); LinphoneCallStats *stats2 = linphone_call_get_video_stats(c2); - if (stats1->ice_state==state && - stats2->ice_state==state){ + if (linphone_call_stats_get_ice_state(stats1)==state && + linphone_call_stats_get_ice_state(stats2)==state){ video_success=TRUE; check_ice_from_rtp(c1,c2,LinphoneStreamTypeVideo); check_ice_from_rtp(c2,c1,LinphoneStreamTypeVideo); @@ -802,8 +802,8 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph if ((c1 != NULL) && (c2 != NULL)) { LinphoneCallStats *stats1 = linphone_call_get_text_stats(c1); LinphoneCallStats *stats2 = linphone_call_get_text_stats(c2); - if (stats1->ice_state==state && - stats2->ice_state==state){ + if (linphone_call_stats_get_ice_state(stats1)==state && + linphone_call_stats_get_ice_state(stats2)==state){ text_success=TRUE; check_ice_from_rtp(c1,c2,LinphoneStreamTypeText); check_ice_from_rtp(c2,c1,LinphoneStreamTypeText);