Yes it really works in that test case. Ryan O'Hara wrote: > On Wed, Jun 10, 2009 at 04:20:51PM +0200, Jan Friesse wrote: >> Ryan, >> this patch breaks SAF Test SaLckLockGrantCallbackT/10.c, and there is >> no close before unlock. I made a patch, but I'm really not sure about >> correctness. > > Does that patch work? Does it fix that particular test case? It is an > interesting idea -- but I am not sure the code can/will ever to this > far with a lock that does not exist. I need to think about this a bit > more. > > > >> Regards, >> Honza >> >> Ryan O'Hara wrote: >>> When unlocking a pending lock request, we must send a response (or >>> callback) to the library indicating an error occured. This patch >>> simply adds a check that the lock is pending before we send the >>> response. >>> >>> Without this fix, callbacks are sent when they are not needed. For >>> example, if we close a resource while holding locks we will hit this >>> code (in lck_unlock) that will incorrectly send callbacks to the >>> library. >>> >>> Ryan >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Openais mailing list >>> [email protected] >>> https://lists.linux-foundation.org/mailman/listinfo/openais > >> diff --git a/trunk/services/lck.c b/trunk/services/lck.c >> index 0e65ba1..6f85111 100644 >> --- a/trunk/services/lck.c >> +++ b/trunk/services/lck.c >> @@ -1819,9 +1819,8 @@ static void lck_unlock ( >> api->timer_delete (resource_lock->timer_handle); >> lck_resourcelock_response_send (resource_lock, >> SA_AIS_ERR_TIMEOUT); >> } >> - else { >> - lck_lockgrant_callback_send (resource_lock, >> SA_AIS_ERR_NOT_EXIST); >> - } >> + } else { >> + lck_lockgrant_callback_send (resource_lock, >> SA_AIS_ERR_NOT_EXIST); >> } >> } >> >
_______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
