File transmission-data-corruption-ticket1242.patch of Package transmission

--- transmission-1.34/libtransmission/peer-msgs.c.bak	2010-03-24 16:05:15.788593931 -0500
+++ transmission-1.34/libtransmission/peer-msgs.c	2010-03-24 16:05:40.986496244 -0500
@@ -1509,7 +1509,6 @@
         return TR_ERROR;
     }
 
-    /* save the block */
     dbgmsg( msgs, "got block %u:%u->%u", req->index, req->offset, req->length );
 
     /**
@@ -1535,6 +1534,10 @@
         clientGotUnwantedBlock( msgs, req );
         return 0;
     }
+    if( tr_cpPieceIsComplete( tor->completion, req->index ) ) { 
+        dbgmsg( msgs, "we did ask for this message, but the piece is already complete..." ); 
+        return 0; 
+    } 
 
     /**
     ***  Save the block
openSUSE Build Service is sponsored by