Hi Mahesh,

The first IF block should be executed if (*i)->mWaitStartTime is not 0 (in 
timespec).
osaf_timespec_compare(&(*i)->mWaitStartTime, &kZeroSeconds) checks if 
(*i)->mWaitStartTime is 0 or not. -1 is not 0 (FALSE), and IF block will be 
executed.

I don't see problem here.

Thanks,
Zoran

-----Original Message-----
From: A V Mahesh [mailto:[email protected]] 
Sent: den 14 juni 2017 12:13
To: Zoran Milinkovic <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 1/1] imm: fix counting timeouts for old critical CCBs 
[#2495]

Hi Zora,

ACK  form me.

Note : osaf_timespec_compare() will also returns  -1 , please cross check once 
the logic at very fist if() condition of void ImmModel::getOldCriticalCcbs() 
looks OK to me .

-AVM


On 6/14/2017 3:03 PM, Zoran Milinkovic wrote:
> The patch fix counting timeouts for old critical CCBs
> ---
>   src/imm/immnd/ImmModel.cc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc 
> index 25f8621..d76142e 100644
> --- a/src/imm/immnd/ImmModel.cc
> +++ b/src/imm/immnd/ImmModel.cc
> @@ -14240,7 +14240,7 @@ void ImmModel::getOldCriticalCcbs(IdVector& cv, 
> SaUint32T* pbeConnPtr,
>         }
>   
>         if ((ccb->mPbeRestartId == 0) &&
> -          osaf_timer_is_expired_sec(&now, &ccb->mWaitStartTime,
> +          !osaf_timer_is_expired_sec(&now, &ccb->mWaitStartTime,
>                                       (DEFAULT_TIMEOUT_SEC + addSecs))) {
>           timespec elapsed;
>           osaf_timespec_subtract(&now, &ccb->mWaitStartTime, 
> &elapsed);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to