soc.2009.transport: 80af25a0: Fixed filetransfer

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Tue Jul 28 11:50:43 EDT 2009


-----------------------------------------------------------------
Revision: 80af25a01a5ddf83061433341b3b3303f8d62417
Ancestor: a06bdf16fe7e16f4944ef6bf154a97e625d55d2d
Author: hanzz at soc.pidgin.im
Date: 2009-07-28T15:09:48
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/80af25a01a5ddf83061433341b3b3303f8d62417

Modified files:
        patches/01-gloox-filetransfer-component.diff receivefile.cpp
        sendfile.cpp

ChangeLog: 

Fixed filetransfer

-------------- next part --------------
============================================================
--- patches/01-gloox-filetransfer-component.diff	6a69b74a179b5cc8ecc4ffe62808a2e18fab6555
+++ patches/01-gloox-filetransfer-component.diff	38d0673fa903b5e56848b548b88a04ef8a8cbd30
@@ -389,7 +389,40 @@ Index: socks5bytestreammanager.cpp
        sha.feed( to.full() );
        m_server->registerHash( sha.hex() );
      }
-@@ -414,18 +415,18 @@
+@@ -206,6 +207,7 @@
+     asi.sHosts = m_hosts;
+     asi.id = id;
+     asi.from = to;
++	asi.to = from;
+     asi.incoming = false;
+     m_asyncTrackMap[msid] = asi;
+ 
+@@ -229,6 +231,7 @@
+     if( item.incoming )
+     {
+       iq = new IQ( IQ::Result, item.from.full(), item.id );
++	  iq->setFrom(item.to.full());
+       if( success )
+         iq->addExtension( new Query( jid, sid, false ) );
+       else
+@@ -274,6 +277,7 @@
+         asi.sHosts = q->hosts();
+         asi.id = iq.id();
+         asi.from = iq.from();
++		asi.to = iq.to();
+         asi.incoming = true;
+         m_asyncTrackMap[sid] = asi;
+         m_socks5BytestreamHandler->handleIncomingBytestreamRequest( sid, iq.from() );
+@@ -330,7 +334,7 @@
+ 
+     SOCKS5Bytestream* s5b = new SOCKS5Bytestream( this, m_parent->connectionImpl()->newInstance(),
+                                                   m_parent->logInstance(),
+-                                                  (*it).second.from, m_parent->jid(), sid );
++                                                  (*it).second.from, (*it).second.to, sid );
+     s5b->setStreamHosts( (*it).second.sHosts );
+     m_s5bMap[sid] = s5b;
+     m_socks5BytestreamHandler->handleIncomingBytestream( s5b );
+@@ -414,18 +418,18 @@
                  {
                    SHA sha;
                    sha.feed( (*it).second );
@@ -498,3 +531,11 @@ Index: socks5bytestreammanager.h
  
        /**
         * To get rid of a bytestream (i.e., close and delete it), call this function. You
+@@ -281,6 +281,7 @@
+       struct AsyncS5BItem
+       {
+         JID from;
++		JID to;
+         std::string id;
+         StreamHostList sHosts;
+         bool incoming;
============================================================
--- receivefile.cpp	76fb7d232b8d996296541d415a7475551a29e470
+++ receivefile.cpp	28b1f835c7df9157c6776a6f5017f07e990fdb45
@@ -71,7 +71,7 @@ ReceiveFile::ReceiveFile(gloox::Bytestre
     m_stream = stream;
     m_size = size;
     m_filename = filename;
-//     m_stream->registerSOCKS5BytestreamDataHandler(this);
+	m_stream->registerBytestreamDataHandler (this);
     m_finished = false;
 	m_mutex = mutex;
 	m_parent = manager;
============================================================
--- sendfile.cpp	490c044bdc6f0924af407f028ccd87d69f702284
+++ sendfile.cpp	3d47e342c983153ddb14d1e2b6e905b4d64eab63
@@ -25,7 +25,7 @@ SendFile::SendFile(gloox::Bytestream *st
     m_stream = stream;
     m_filename = filename;
     m_size = size;
-//     m_stream->registerBytestreamBytestreamDataHandler(this);
+	m_stream->registerBytestreamDataHandler (this);
 	m_mutex = mutex;
 	m_parent = manager;
 	if (m_stream->connect())


More information about the Commits mailing list