fix compilation issues and bugfix in tests

This commit is contained in:
Simon Morlat 2015-11-25 14:53:22 +01:00
parent 4ad41a4b8e
commit 6a9247d6f6
3 changed files with 17 additions and 14 deletions

View file

@ -7387,11 +7387,13 @@ const char* linphone_transport_to_string(LinphoneTransportType transport) {
LinphoneTransportType linphone_transport_parse(const char* transport) {
return (LinphoneTransportType)sal_transport_parse(transport);
}
const char *linphone_streamtype_to_string(const LinphoneStreamType type) {
const char *linphone_stream_type_to_string(const LinphoneStreamType type) {
switch (type) {
case LinphoneStreamTypeAudio: return "LinphoneStreamTypeAudio";
case LinphoneStreamTypeVideo: return "LinphoneStreamTypeVideo";
case LinphoneStreamTypeText: return "LinphoneStreamTypeText";
case LinphoneStreamTypeUnknown: return "LinphoneStreamTypeUnknown";
}
return "INVALID";
}

View file

@ -146,7 +146,7 @@ typedef enum _LinphoneStreamType LinphoneStreamType;
* @ingroup initializing
**/
LINPHONE_PUBLIC const char *linphone_streamtype_to_string(const LinphoneStreamType);
LINPHONE_PUBLIC const char *linphone_stream_type_to_string(const LinphoneStreamType);
/**
* Object that represents a SIP address.
*

View file

@ -550,24 +550,25 @@ void liblinphone_tester_uninit(void) {
}
static void check_ice_from_rtp(LinphoneCall *c1, LinphoneCall *c2, LinphoneStreamType stream_type) {
MediaStream ms;
MediaStream *ms;
switch (stream_type) {
case LinphoneStreamTypeAudio:
ms=c1->audiostream->ms;
break;
ms=&c1->audiostream->ms;
break;
case LinphoneStreamTypeVideo:
ms=c1->videostream->ms;
break;
case LinphoneStreamTypeUnknown:
ms=c1->textstream->ms;
break;
default:
ms_error("Uknown stream type [%s]", linphone_streamtype_to_string(stream_type));
break;
ms=&c1->videostream->ms;
break;
case LinphoneStreamTypeText:
ms=&c1->textstream->ms;
break;
default:
ms_error("Unknown stream type [%s]", linphone_stream_type_to_string(stream_type));
BC_ASSERT_FALSE(stream_type >= LinphoneStreamTypeUnknown);
return;
}
if (linphone_call_get_audio_stats(c1)->ice_state == LinphoneIceStateHostConnection && media_stream_started(&ms)) {
if (linphone_call_get_audio_stats(c1)->ice_state == LinphoneIceStateHostConnection && media_stream_started(ms)) {
char ip[16];
char port[8];
getnameinfo((const struct sockaddr *)&c1->audiostream->ms.sessions.rtp_session->rtp.gs.rem_addr