Commit 7ec3f703 authored by Ghislain MARY's avatar Ghislain MARY

Fix multicast tester.

parent 76ce881f
......@@ -72,7 +72,10 @@ void CallPrivate::initiateIncoming () {
}
bool CallPrivate::initiateOutgoing () {
return getActiveSession()->initiateOutgoing();
shared_ptr<CallSession> session = getActiveSession();
bool defer = session->initiateOutgoing();
session->getPrivate()->createOp();
return defer;
}
void CallPrivate::iterate (time_t currentRealTime, bool oneSecondElapsed) {
......
......@@ -72,6 +72,7 @@ shared_ptr<CallSession> ClientGroupChatRoomPrivate::createSession () {
myCleanedAddress.removeUriParam("gr"); // Remove gr parameter for INVITE
session->configure(LinphoneCallOutgoing, nullptr, nullptr, myCleanedAddress, focus->getPrivate()->getDevices().front()->getAddress());
session->initiateOutgoing();
session->getPrivate()->createOp();
return session;
}
......
......@@ -42,6 +42,7 @@ public:
bool startPing ();
void setPingTime (int value) { pingTime = value; }
void createOp ();
CallSessionParams *getCurrentParams () const { return currentParams; }
LinphoneProxyConfig * getDestProxy () const { return destProxy; }
SalCallOp * getOp () const { return op; }
......@@ -95,7 +96,6 @@ protected:
private:
void completeLog ();
void createOp ();
void createOpTo (const LinphoneAddress *to);
LinphoneAddress * getFixedContact () const;
......
......@@ -212,6 +212,10 @@ void CallSessionPrivate::setParams (CallSessionParams *csp) {
params = csp;
}
void CallSessionPrivate::createOp () {
createOpTo(log->to);
}
bool CallSessionPrivate::isInConference () const {
return params->getPrivate()->getInConference();
}
......@@ -735,10 +739,6 @@ void CallSessionPrivate::completeLog () {
linphone_core_report_call_log(q->getCore()->getCCore(), log);
}
void CallSessionPrivate::createOp () {
createOpTo(log->to);
}
void CallSessionPrivate::createOpTo (const LinphoneAddress *to) {
L_Q();
if (op)
......@@ -1014,10 +1014,7 @@ bool CallSession::initiateOutgoing () {
d->log->start_date_time = ms_time(nullptr);
if (!d->destProxy)
defer = d->startPing();
if (d->direction == LinphoneCallOutgoing) {
d->createOpTo(d->log->to);
}
return defer;
return defer;
}
void CallSession::iterate (time_t currentRealTime, bool oneSecondElapsed) {
......
......@@ -999,8 +999,12 @@ void MediaSessionPrivate::fillMulticastMediaAddresses () {
L_Q();
if (getParams()->audioMulticastEnabled())
mediaPorts[mainAudioStreamIndex].multicastIp = linphone_core_get_audio_multicast_addr(q->getCore()->getCCore());
else
mediaPorts[mainAudioStreamIndex].multicastIp.clear();
if (getParams()->videoMulticastEnabled())
mediaPorts[mainVideoStreamIndex].multicastIp = linphone_core_get_video_multicast_addr(q->getCore()->getCCore());
else
mediaPorts[mainVideoStreamIndex].multicastIp.clear();
}
int MediaSessionPrivate::selectFixedPort (int streamIndex, pair<int, int> portRange) {
......@@ -4022,6 +4026,7 @@ void MediaSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cf
if (direction == LinphoneCallOutgoing) {
d->selectOutgoingIpVersion();
d->getLocalIp(to);
d->initializeStreams(); // Reserve the sockets immediately
d->getCurrentParams()->getPrivate()->setUpdateCallWhenIceCompleted(d->getParams()->getPrivate()->getUpdateCallWhenIceCompleted());
d->fillMulticastMediaAddresses();
if (d->natPolicy && linphone_nat_policy_ice_enabled(d->natPolicy))
......@@ -4049,6 +4054,7 @@ void MediaSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cf
lWarning() << "ICE not supported for incoming INVITE without SDP";
}
}
d->initializeStreams(); // Reserve the sockets immediately
if (d->natPolicy)
d->runStunTestsIfNeeded();
d->discoverMtu(cleanedFrom);
......
......@@ -602,7 +602,7 @@ void liblinphone_tester_add_suites() {
#ifdef VIDEO_ENABLED
bc_tester_add_suite(&video_test_suite);
#endif // ifdef VIDEO_ENABLED
//bc_tester_add_suite(&multicast_call_test_suite);
bc_tester_add_suite(&multicast_call_test_suite);
bc_tester_add_suite(&proxy_config_test_suite);
#if HAVE_SIPP
bc_tester_add_suite(&complex_sip_call_test_suite);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment