import org.simgrid.msg.Host;
import org.simgrid.msg.Msg;
import org.simgrid.msg.MsgException;
import org.simgrid.msg.Host;
import org.simgrid.msg.Msg;
import org.simgrid.msg.MsgException;
if (!currentPieces.remove((Object)Integer.valueOf(message.index))) {
}
//Setting the fact that we have the piece
if (!currentPieces.remove((Object)Integer.valueOf(message.index))) {
}
//Setting the fact that we have the piece
Msg.debug("My status is now " + getStatus());
//Sending the information to all the peers we are connected to
sendHave(message.index);
Msg.debug("My status is now " + getStatus());
//Sending the information to all the peers we are connected to
sendHave(message.index);
if (peerChoosed != null) {
activePeers.put(peerChoosed.id,peerChoosed);
peerChoosed.chokedUpload = false;
sendUnchoked(peerChoosed.mailbox);
}
}
if (peerChoosed != null) {
activePeers.put(peerChoosed.id,peerChoosed);
peerChoosed.chokedUpload = false;
sendUnchoked(peerChoosed.mailbox);
}
}