projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e0b617
)
only send data to a peer if the peer exists
author
Nathan Binkert
<binkertn@umich.edu>
Mon, 27 Oct 2003 03:38:26 +0000
(22:38 -0500)
committer
Nathan Binkert
<binkertn@umich.edu>
Mon, 27 Oct 2003 03:38:26 +0000
(22:38 -0500)
dev/etherint.hh:
only send data to the peer if there is a peer
--HG--
extra : convert_revision :
33d90679ed91a2b2842ce4155ac4e58ec3defc22
dev/etherint.hh
patch
|
blob
|
history
diff --git
a/dev/etherint.hh
b/dev/etherint.hh
index 1aa85f17ce15193889b94be3dd3ef390f209eb9d..dfc9f6fd6350ed62329860a244797ca512370366 100644
(file)
--- a/
dev/etherint.hh
+++ b/
dev/etherint.hh
@@
-56,7
+56,10
@@
class EtherInt : public SimObject
void setPeer(EtherInt *p);
virtual bool recvPacket(PacketPtr packet) = 0;
void recvDone() { peer->sendDone(); }
- bool sendPacket(PacketPtr packet) { return peer->recvPacket(packet); }
+ bool sendPacket(PacketPtr packet)
+ {
+ return peer ? peer->recvPacket(packet) : true;
+ }
virtual void sendDone() = 0;
};