Browse Source

Merge branch 'pr566'

pull/568/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
aec042e4ed
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 3
      src/core.cpp
  2. 2
      src/core.h

3
src/core.cpp

@ -39,6 +39,7 @@ @@ -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) @@ -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)

2
src/core.h

@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
#include <cstdint>
#include <QObject>
#include <QMutex>
#include "corestructs.h"
#include "coreav.h"
@ -253,6 +254,7 @@ private: @@ -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"

Loading…
Cancel
Save