Skip to content

Commit

Permalink
change recursive lcm_handle test to an assert
Browse files Browse the repository at this point in the history
git-svn-id: https://lcm.googlecode.com/svn/trunk@546 989093bb-e83e-0410-a25a-9184cbcad8d0
  • Loading branch information
ashuang committed May 19, 2011
1 parent 4b37afe commit de4367e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lcm/lcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ lcm_handle (lcm_t * lcm)
if (lcm->provider && lcm->vtable->handle) {
int ret;
g_static_rec_mutex_lock (&lcm->handle_mutex);
if(lcm->in_handle) {
fprintf(stderr, "Recursive calls to lcm_handle are not allowed\n");
return -1;
}
assert(!lcm->in_handle); // recursive calls to lcm_handle are not allowed
lcm->in_handle = 1;
ret = lcm->vtable->handle (lcm->provider);
lcm->in_handle = 0;
Expand Down

0 comments on commit de4367e

Please sign in to comment.