mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
fix(Cli): add a static_cast on header length (executeUri)
This commit is contained in:
parent
5cb47b0eea
commit
28158775b7
1 changed files with 4 additions and 5 deletions
|
|
@ -52,16 +52,15 @@ static void cliJoinConference (QHash<QString, QString> &args) {
|
|||
CoreManager::getInstance()->getCallsListModel()->launchAudioCall(sipAddress, args);
|
||||
}
|
||||
|
||||
|
||||
static void cliJoinConferenceAs (QHash<QString, QString> &args) {
|
||||
const QString toSipAddress = args.take("sip-address");
|
||||
const QString fromSipAddress = args.take("guest-sip-address");
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
shared_ptr<linphone::Address> currentSipAddress = core->getDefaultProxyConfig()->getIdentityAddress()->clone();
|
||||
currentSipAddress->clean();
|
||||
if (fromSipAddress!=::Utils::coreStringToAppString(currentSipAddress->asStringUriOnly())) {
|
||||
if (fromSipAddress != ::Utils::coreStringToAppString(currentSipAddress->asStringUriOnly())) {
|
||||
qWarning() << QStringLiteral("guest sip address `%1` is not one of yours.")
|
||||
.arg(fromSipAddress);
|
||||
.arg(fromSipAddress);
|
||||
return;
|
||||
}
|
||||
args["method"] = QStringLiteral("join-conference");
|
||||
|
|
@ -167,10 +166,10 @@ void Cli::Command::execute (QHash<QString, QString> &args) const {
|
|||
|
||||
void Cli::Command::executeUri (const shared_ptr<linphone::Address> &address) const {
|
||||
QHash<QString, QString> args;
|
||||
//TODO: check if there is too much headers.
|
||||
// TODO: check if there is too much headers.
|
||||
for (const auto &argName : mArgsScheme.keys()) {
|
||||
const string header = address->getHeader(::Utils::appStringToCoreString(argName));
|
||||
args[argName] = QByteArray::fromBase64(QByteArray(header.c_str(), header.length()));
|
||||
args[argName] = QByteArray::fromBase64(QByteArray(header.c_str(), static_cast<int>(header.length())));
|
||||
}
|
||||
address->clean();
|
||||
args["sip-address"] = ::Utils::coreStringToAppString(address->asStringUriOnly());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue