summaryrefslogtreecommitdiffstats
path: root/pica-client/skynet.cpp
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-01-20 16:08:48 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-01-20 16:08:48 +0000
commit928d8538b2bc1c42e377def8466f50f0ed91291e (patch)
treea3c9ca33f4d159505508f5d4842558559d5184fc /pica-client/skynet.cpp
parentdcec9bcedc769372f1d2a84d24755a8dda43238f (diff)
downloadpica-pica-928d8538b2bc1c42e377def8466f50f0ed91291e.tar.gz
pica-pica-928d8538b2bc1c42e377def8466f50f0ed91291e.zip
delivering undelivered messages from history
git-svn-id: svn://localhost/project_picapica/trunk@222 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/skynet.cpp')
-rw-r--r--pica-client/skynet.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/pica-client/skynet.cpp b/pica-client/skynet.cpp
index 44f0101..942cdd0 100644
--- a/pica-client/skynet.cpp
+++ b/pica-client/skynet.cpp
@@ -7,7 +7,7 @@
//#include <QMessageBox> //debug
//#include "dialogs/forgedcertdialog.h"
#include <QDebug>
-
+#include "history.h"
SkyNet::SkyNet()
: nodes(config_dbname), QObject(0)
@@ -62,6 +62,14 @@ void SkyNet::nodethread_connected(QString addr, quint16 port, NodeThread *thread
//restore old peer connections, if any
QList<quint32> c2c_peer_ids;
+ //load undelivered messages from history
+ if (msgqueues.isEmpty())
+ {
+ History h(config_dbname, account_id);
+
+ msgqueues = h.GetUndeliveredMessages();
+ }
+
c2c_peer_ids = msgqueues.keys();
for (int i = 0; i < c2c_peer_ids.size(); i++)