Commit c515eec4 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(app): test correctly valid sip addresses at many points

parent 3ddcdd22
...@@ -53,7 +53,7 @@ static void cliInitiateConference (QHash<QString, QString> &args) { ...@@ -53,7 +53,7 @@ static void cliInitiateConference (QHash<QString, QString> &args) {
// Check identity. // Check identity.
{ {
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(args["sip-address"])); shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(args["sip-address"]));
if (!address) { if (!address || address->getUsername().empty()) {
qWarning() << QStringLiteral("Unable to parse invalid sip address."); qWarning() << QStringLiteral("Unable to parse invalid sip address.");
return; return;
} }
......
...@@ -95,7 +95,7 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QHash<QSt ...@@ -95,7 +95,7 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QHash<QSt
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore(); shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(sipAddress)); shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(sipAddress));
if (!address) if (!address || address->getUsername().empty())
return; return;
shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr); shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
...@@ -120,7 +120,7 @@ void CallsListModel::launchVideoCall (const QString &sipAddress) const { ...@@ -120,7 +120,7 @@ void CallsListModel::launchVideoCall (const QString &sipAddress) const {
} }
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(sipAddress)); shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(sipAddress));
if (!address) if (!address || address->getUsername().empty())
return; return;
shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr); shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
......
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