]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
Fixed segfault when the peer was not discovered within timeout
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 7 Oct 2008 21:52:21 +0000 (23:52 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 7 Oct 2008 21:52:21 +0000 (23:52 +0200)
It seems, that the discovery race condition appears only on SMP systems.
There is no problem with discovery test on non-SMP machine.

src/peer.c

index ca4e2fc58e5d7ad7b64991b6d50d33ee68db4bbf..321e729c53c07a3f5472bbf729167311a1518ec6 100644 (file)
@@ -133,6 +133,7 @@ forb_peer_find_timed(forb_t *forb, forb_server_id *server_id,
                        /* TODO: How to remove the peer from the tree?
                         * We should check refcnt and if equal to 1,
                         * we should remove it.  */
+                       break;
                }
        }
 unlock: