Closed Bug 777884 Opened 12 years ago Closed 12 years ago

Bug in watcher means that it will never reboot if max # of "strikes" is greater than 1 when pinging external machine

Categories

(Testing Graveyard :: SUTAgent, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: wlach, Assigned: wlach)

Details

Attachments

(1 file)

Unfortunately when doing some cleanup related to bug 721936, I accidentally messed up some logic. Specifically I consolidated the code to check if we've exceeded the maximum number of failed ping targets to this statement:

if (!sRet.contains("3 received") && ++nStrikes >= nMaxStrikes) {
...
} else {
  nStrikes = 0;
}

As I should have realized, this will never work as the if clause will never evaluate to "true" if nMaxStrikes > 1 (which it is by default). We need to do the second check inside the body of the if statement. Easy fix.
Pretty straightforward patch, builds on earlier work in bug 777836 (which will have to be applied before this one)
Comment on attachment 646292 [details] [diff] [review]
Fix code in watcher to reboot if maximum number of failed ping attempts exceeded

This basically just fixes a bug I introduced earlier (see bug description).
Attachment #646292 - Flags: review?(jmaher)
Comment on attachment 646292 [details] [diff] [review]
Fix code in watcher to reboot if maximum number of failed ping attempts exceeded

Review of attachment 646292 [details] [diff] [review]:
-----------------------------------------------------------------

I like simple patches.
Attachment #646292 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/cb6ccdd22f5a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: