From: <vi...@us...> - 2010-07-28 08:28:01
|
Revision: 12093 http://amsn.svn.sourceforge.net/amsn/?rev=12093&view=rev Author: vivia Date: 2010-07-28 08:27:55 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Cleanup of snit objects Modified Paths: -------------- branches/p2p/msnp2p/session.tcl branches/p2p/msnp2p/transport/base.tcl branches/p2p/msnp2p/transport/switchboard.tcl branches/p2p/msnp2p.tcl branches/p2p/protocol.tcl Modified: branches/p2p/msnp2p/session.tcl =================================================================== --- branches/p2p/msnp2p/session.tcl 2010-07-28 08:17:39 UTC (rev 12092) +++ branches/p2p/msnp2p/session.tcl 2010-07-28 08:27:55 UTC (rev 12093) @@ -173,7 +173,7 @@ $msg conf2 $msg setBody $body $self Send_p2p_data $msg - #destroy $self + destroy $self } @@ -302,14 +302,16 @@ method On_data_blob_sent { blob } { ::Event::fireEvent p2pIncomingCompleted p2p [$blob cget -data] - #destroy $self ;#Suicide???? + destroy $blob + destroy $self ;#Suicide???? } method On_data_blob_received { blob } { ::Event::fireEvent p2pOutgoingSessionTransferCompleted p2p $self [$blob cget -data] - #destroy $self + destroy $blob + destroy $self } Modified: branches/p2p/msnp2p/transport/base.tcl =================================================================== --- branches/p2p/msnp2p/transport/base.tcl 2010-07-28 08:17:39 UTC (rev 12092) +++ branches/p2p/msnp2p/transport/base.tcl 2010-07-28 08:27:55 UTC (rev 12093) @@ -172,7 +172,6 @@ } set first 0 - puts $data_blob_queue set blob [lindex [lindex $queue 0] 2] set peer_guid [lindex [lindex $queue 0] 1] @@ -185,13 +184,14 @@ $self __Send_chunk $peer $peer_guid $chunk if { [$blob is_complete] } { - puts "Queue says blob $blob is complete" + status_log "Queue says blob $blob is complete" set queue [lreplace $queue 0 0] set data_blob_queue $queue $self Add_pending_blob [$chunk ack_id] $blob } else { - puts "Blob size is [$blob cget -blob_size] and we have [$blob transferred]" + status_log "Blob size is [$blob cget -blob_size] and we have [$blob transferred]" } + destroy $chunk return 1 } Modified: branches/p2p/msnp2p/transport/switchboard.tcl =================================================================== --- branches/p2p/msnp2p/transport/switchboard.tcl 2010-07-28 08:17:39 UTC (rev 12092) +++ branches/p2p/msnp2p/transport/switchboard.tcl 2010-07-28 08:27:55 UTC (rev 12093) @@ -82,7 +82,7 @@ } set chunk [MessageChunk parse $version [string range [$message get_body] 0 end-4]] binary scan [string range [$message get_body] end-4 end] iu appid - $message configure -application_id $appid + destroy $message $self On_chunk_received [$self cget -peer] [$self cget -peer_guid] $chunk } Modified: branches/p2p/msnp2p.tcl =================================================================== --- branches/p2p/msnp2p.tcl 2010-07-28 08:17:39 UTC (rev 12092) +++ branches/p2p/msnp2p.tcl 2010-07-28 08:27:55 UTC (rev 12093) @@ -1302,7 +1302,7 @@ proc RequestObjectEx { chatid dest msnobject type} { #@@@@@@@@@@TODO: callback!!! - puts "Requesting $msnobject" + status_log "Requesting $msnobject" $::obj_stor request [::p2p::MSNObject parse $msnobject] [list ::amsn::WriteNewData] } Modified: branches/p2p/protocol.tcl =================================================================== --- branches/p2p/protocol.tcl 2010-07-28 08:17:39 UTC (rev 12092) +++ branches/p2p/protocol.tcl 2010-07-28 08:27:55 UTC (rev 12093) @@ -5418,9 +5418,10 @@ } } application/x-msnmsgrp2p { - puts "Received $message" + status_log "Received $message" set msg [::p2p::Message create %AUTO%] $msg parse [$message getPayload] + destroy $message #@@@@@@@@@@p2pv2 set transport [$::trsp_mgr Get_transport $typer "" ""] $transport On_message_received $msg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |