summaryrefslogtreecommitdiffstats
path: root/src/pvs.cpp
diff options
context:
space:
mode:
authorSebastien Braun2010-10-03 16:14:44 +0200
committerSebastien Braun2010-10-03 16:14:44 +0200
commitffee0868ef1341cfb7622821431cb73c52590962 (patch)
treebc96be65e0346ea25a8effb2118de59b08d54466 /src/pvs.cpp
parentAdd patch for OpenPGM to fix switch() fallthrough (diff)
downloadpvs-ffee0868ef1341cfb7622821431cb73c52590962.tar.gz
pvs-ffee0868ef1341cfb7622821431cb73c52590962.tar.xz
pvs-ffee0868ef1341cfb7622821431cb73c52590962.zip
Assorted Multicast Fixes:
- Upgrade bundled OpenPGM to SVN r1135 - Timing fixes: Make all rate-limited and timer-pending operation wait for at least 1ms to avoid busy-waiting - No distinction between sending and receiving sockets when setting up socket options (Receivers need to be able to send anyway when using PGMCC). - Switch from fixed-rate transmission to using PGMCC for congestion control. - Remove some obnoxious debugging outputs - Some white space fixes - Introduce a short waiting time before actually starting file transmission in order to allow enough SPM messages to be sent so that receivers can initialize properly. - Fix MCASTFTANNOUNCE message to include full file name instead of basename. - Fix generateMcastTransferID in order to gather more random IDs. PVSGUI may become confused if transfer IDs are reused. - Properly dispose of clientFileReceiveDialog when multicast transfer is finished. - Properly display transfer size in clientFileReceiveDialog
Diffstat (limited to 'src/pvs.cpp')
-rw-r--r--src/pvs.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pvs.cpp b/src/pvs.cpp
index c217d52..9bd36d6 100644
--- a/src/pvs.cpp
+++ b/src/pvs.cpp
@@ -10,6 +10,10 @@
# General information about OpenSLX can be found at http://openslx.org/
*/
+#include <QCryptographicHash>
+#include <QDataStream>
+#include <QDateTime>
+
#include "pvs.h"
#include "src/util/dispatcher.h"
#include "src/net/pvsMsg.h"
@@ -779,7 +783,11 @@ quint64 PVS::generateMcastTransferID()
if (!nodeID)
{
- QDataStream(QCryptographicHash::hash(getUserName().toLocal8Bit(), QCryptographicHash::Md5)) >> nodeID;
+ QDateTime t = QDateTime::currentDateTime();
+ QCryptographicHash h(QCryptographicHash::Md5);
+ h.addData(getUserName().toLocal8Bit());
+ h.addData(t.toString().toLocal8Bit());
+ QDataStream(h.result()) >> nodeID;
}
return (nodeID & Q_UINT64_C(0xffffffffffff0000)) | (quint64)(++counter);