Improve error reporting of PR_Connect failure in strsclnt

RESOLVED FIXED in 3.15.4

Status

NSS
Libraries
P2
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.51 KB, patch
briansmith
: review+
Wan-Teh Chang
: checked-in+
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
Created attachment 8349603 [details] [diff] [review]
Patch

The attached patch improves error reporting of PR_Connect failure in
strsclnt.

1. I changed errWarn to print the OS error and not insert a newline
before the error string.

Right now it prints this:

strsclnt: PR_Connect returned error -5982:
Local Network address is in use

With the patch, it will print this:

strsclnt: PR_Connect returned error -5982, OS error 98: Local Network address is in use

2. I save and restore the error codes if we call other functions after
PR_Connect fails.
Attachment #8349603 - Flags: review?(brian)
Attachment #8349603 - Flags: review?(brian) → review+
(Assignee)

Comment 1

5 years ago
Comment on attachment 8349603 [details] [diff] [review]
Patch

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

https://hg.mozilla.org/projects/nss/rev/2c499c260b55
Attachment #8349603 - Flags: checked-in+
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.15.4
You need to log in before you can comment on or make changes to this bug.