summaryrefslogtreecommitdiffstats
path: root/pica-client/skynet.cpp
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2014-08-06 23:32:53 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2014-08-06 23:32:53 +0000
commit249a43afa87a8fca8979cd9d0ec9ac6522205d2b (patch)
treef741991624e3c77d86c8b51e353228c8b5375833 /pica-client/skynet.cpp
parent3e1c3cd989180d2085ce5af7f4db2b156d5df578 (diff)
downloadpica-pica-249a43afa87a8fca8979cd9d0ec9ac6522205d2b.tar.gz
pica-pica-249a43afa87a8fca8979cd9d0ec9ac6522205d2b.zip
handling peer disconnect and remote io error during filetransfer
git-svn-id: svn://localhost/project_picapica/trunk@316 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/skynet.cpp')
-rw-r--r--pica-client/skynet.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/pica-client/skynet.cpp b/pica-client/skynet.cpp
index f4a3c2b..54b1a85 100644
--- a/pica-client/skynet.cpp
+++ b/pica-client/skynet.cpp
@@ -594,6 +594,12 @@ void SkyNet::emit_IncomingFileFinished(QByteArray peer_id)
emit IncomingFileFinished(peer_id);
}
+void SkyNet::emit_ChannelClosed(QByteArray peer_id)
+{
+ emit ChannelClosed(peer_id);
+}
+
+
//callbacks
//all callbacks are executed in separate thread, created in Nodethread instance, REMEMBER THAT !!!
@@ -648,6 +654,7 @@ void SkyNet::channel_closed_cb(const unsigned char *peer_id, int reason)
qDebug()<<"channel closed ("<<QByteArray((const char*)peer_id, PICA_ID_SIZE).toBase64()
<<", error_code =" << reason << ")\n";
+ skynet->emit_ChannelClosed(QByteArray((const char*)peer_id, PICA_ID_SIZE));
}
void SkyNet::nodelist_cb(int type, void *addr_bin, const char *addr_str, unsigned int port)