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