mem: addr_mapper: restore old address if request not sent

Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
Christoph Pfister 2015-05-30 13:45:17 +02:00
parent 31825bd988
commit 4a17494708

View file

@ -128,9 +128,13 @@ AddrMapper::recvTimingReq(PacketPtr pkt)
// packets) // packets)
bool successful = masterPort.sendTimingReq(pkt); bool successful = masterPort.sendTimingReq(pkt);
// If not successful, restore the sender state // If not successful, restore the address and sender state
if (!successful && needsResponse) { if (!successful) {
delete pkt->popSenderState(); pkt->setAddr(orig_addr);
if (needsResponse) {
delete pkt->popSenderState();
}
} }
return successful; return successful;