1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr566'

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-10-29 17:38:40 +01:00
commit aec042e4ed
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
2 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,7 @@
#include <QList>
#include <QBuffer>
#include <QMessageBox>
#include <QMutexLocker>
const QString Core::CONFIG_FILE_NAME = "data";
const QString Core::TOX_EXT = ".tox";
@ -768,6 +769,8 @@ void Core::sendGroupMessage(int groupId, const QString& message)
void Core::sendFile(int32_t friendId, QString Filename, QString FilePath, long long filesize)
{
QMutexLocker mlocker(&fileSendMutex);
QByteArray fileName = Filename.toUtf8();
int fileNum = tox_new_file_sender(tox, friendId, filesize, (uint8_t*)fileName.data(), fileName.size());
if (fileNum == -1)

View File

@ -19,6 +19,7 @@
#include <cstdint>
#include <QObject>
#include <QMutex>
#include "corestructs.h"
#include "coreav.h"
@ -253,6 +254,7 @@ private:
int dhtServerId;
static QList<ToxFile> fileSendQueue, fileRecvQueue;
static ToxCall calls[];
QMutex fileSendMutex;
uint8_t* pwsaltedkeys[PasswordType::ptCounter]; // use the pw's hash as the "pw"