Closed Bug 330701 Opened 18 years ago Closed 18 years ago

NS_NewPipe with default segment size ignores max size

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jhpedemonte, Unassigned)

Details

Attachments

(1 file)

From bug 315767:

Darin: "The problem is that we were passing 0 for the segmentSize of
the pipe, which causes the pipe to use its default configuration, ignoring the
value of maxSize passed to it.  The real fix to this bug is to change
NS_NewPipe to honor maxSize even when segmentSize is 0."
Attached patch patchSplinter Review
Moved the NS_NewPipe impl code out of the IDL file and into nsPipe3.cpp, so it can use the DEFAULT_SEGMENT_SIZE define.  I also special cased maxSize == PR_UINT32_MAX to pass a segmentCount of PR_UINT32_MAX, since in both cases this means "infinite", according to the docs.
Attachment #215289 - Flags: review?(darin)
Hmm, this patch would break any embedders who are using this API, right?  How much does that matter, considering that it's not frozen?
No worries there.  The symbol is only exported by libxpcom_core.so, which doesn't even exist in a xulrunner build.
Comment on attachment 215289 [details] [diff] [review]
patch

Please add this new function to xpcom/build/dlldeps.cpp to avoid breaking the windows build :)
Attachment #215289 - Flags: review?(darin) → review+
Checked in to trunk.  -> FIXED

Darin, do you think this needs to go on the 1.8 branch?
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
No, let's only put it on the 1.8 branch if there is a need.  People can work around this bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: