apparent code error in netwerk/dns/src/nsDnsService.cpp

VERIFIED FIXED

Status

()

VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: nate, Assigned: darin.moz)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4

I've been having problems with slow DNS lookups, and spent a little
time wandering through the DNS code trying to figure out how it works.

While reading through netwerk/dns/src/nsDnsService.cpp I found what looks
to be a simple code error.  I have no idea if it is related to my problem,
but likes like it should be fixed.

873     if (PR_SUCCESS != status) {
874         if (nsDNSService::Reset());
875             status = DoSyncLookupInternal();
876     }

It looks like there is an extra semicolon at the end of line 874.  As a 
result, the call to DoSyncLookupInternal() will occur whether regardless of
the return value from Reset().  Or perhaps this is just a indent error
and the if() is redundant?  In any case, it is either wrong or misleading, ad
someone with knowledge should check this.


Reproducible: Always

Steps to Reproduce:




Looks like the code is question came about regarding bug #117628.
yep
Assignee: new-network-bugs → darin
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

16 years ago
Created attachment 106510 [details] [diff] [review]
v1 patch

yup, the extra semicolon is a typo.  i don't think this "bug" would actually
manifest itself in any kind of real problem though, but thanks for catching it!
(Assignee)

Updated

16 years ago
Attachment #106510 - Flags: superreview?(bzbarsky)
Attachment #106510 - Flags: review?(bbaetz)
Attachment #106510 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 106510 [details] [diff] [review]
v1 patch

This would cause a slowdown if the dns request failed and we couldn't reset teh
dnsservice. Looking at code, that would mainly affect non-unix plaftorms. ITs
an uncommon case, anyway.

But hey, its a bug ;)
Attachment #106510 - Flags: review?(bbaetz) → review+
(Assignee)

Comment 4

16 years ago
fixed-on-trunk
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.