]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
Fixed a bug in discovery test
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 20 Jan 2009 11:11:50 +0000 (12:11 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 20 Jan 2009 12:30:31 +0000 (13:30 +0100)
src/peer.c
src/tests/discovery.c

index ea04410790dcd6e7a59ec3cc12ae496ad93f8a33..17fcb37c71fce228a4f426b7739a371c20a68ad2 100644 (file)
@@ -87,7 +87,8 @@ void
 forb_peer_release(forb_ref_t *ref)
 {
        forb_peer_t *peer = container_of(ref, forb_peer_t, ref);
-       if (peer->port->desc.proto->peer_destroy) {
+       if (peer->port &&
+           peer->port->desc.proto->peer_destroy) {
                peer->port->desc.proto->peer_destroy(peer);
        }
        forb_free(peer);
index f35cfb125418926075296ec4fc07b3facd81832d..0d388feccde0bb95ec40f319a056874eb82cd978 100644 (file)
@@ -51,7 +51,7 @@
  * 
  * @brief  Test for correctness of peer discovery protocol
  * 
- * Multiple FORB obejcts is created and it is tested whether every
+ * Multiple FORB obejcts are created and it is tested whether every
  * FORB automatically discovers the other FORBs.
  */