mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-28 11:56:20 +00:00
fix(src/externals/single-application/SingleApplication): add casts
This commit is contained in:
parent
0fd79e86e2
commit
63e4132d5c
1 changed files with 3 additions and 3 deletions
|
|
@ -211,7 +211,7 @@ void SingleApplicationPrivate::connectToPrimary (int msecs, char connectionType)
|
|||
|
||||
initMsg.append(connectionType);
|
||||
initMsg.append(reinterpret_cast<const char *>(&instanceNumber), sizeof(quint32));
|
||||
initMsg.append(QByteArray::number(qChecksum(initMsg.constData(), initMsg.length()), 256));
|
||||
initMsg.append(QByteArray::number(qChecksum(initMsg.constData(), static_cast<uint>(initMsg.length())), 256));
|
||||
|
||||
socket->write(initMsg);
|
||||
socket->flush();
|
||||
|
|
@ -296,12 +296,12 @@ void SingleApplicationPrivate::slotConnectionEstablished () {
|
|||
initMsg += tmp;
|
||||
// Verify the checksum of the initMsg
|
||||
QByteArray checksum = QByteArray::number(
|
||||
qChecksum(initMsg.constData(), initMsg.length()),
|
||||
qChecksum(initMsg.constData(), static_cast<uint>(initMsg.length())),
|
||||
256
|
||||
);
|
||||
tmp = nextConnSocket->read(checksum.length());
|
||||
if (checksum == tmp)
|
||||
break; // Otherwise set to invalid connection (next line)
|
||||
break; // Otherwise set to invalid connection (next line)
|
||||
}
|
||||
default:
|
||||
connectionType = InvalidConnection;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue