summaryrefslogtreecommitdiff
path: root/pr/src/io/prlayer.c
diff options
context:
space:
mode:
authorsrinivas%netscape.com <devnull@localhost>1999-10-22 20:49:19 +0000
committersrinivas%netscape.com <devnull@localhost>1999-10-22 20:49:19 +0000
commitf7bdd4e60380c1b5c0bc92ea06ef55d82bcd25a3 (patch)
treefac8ee0bec60218ef8014b1f842c3cc67581f6cd /pr/src/io/prlayer.c
parent1028ee5bd887410a9d7f70b3c397c9a1ba9d9d5f (diff)
downloadnspr-hg-f7bdd4e60380c1b5c0bc92ea06ef55d82bcd25a3.tar.gz
Add PR_SendFile to the PRIOMethods tables to enable use in layered FDs.
Bugzilla #17012.
Diffstat (limited to 'pr/src/io/prlayer.c')
-rw-r--r--pr/src/io/prlayer.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/pr/src/io/prlayer.c b/pr/src/io/prlayer.c
index d1861f93..39a5d694 100644
--- a/pr/src/io/prlayer.c
+++ b/pr/src/io/prlayer.c
@@ -355,6 +355,17 @@ static PRStatus PR_CALLBACK pl_DefSetsocketoption (
return (fd->lower->methods->setsocketoption)(fd->lower, data);
}
+static PRInt32 PR_CALLBACK pl_DefSendfile (
+ PRFileDesc *sd, PRSendFileData *sfd,
+ PRTransmitFileFlags flags, PRIntervalTime timeout)
+{
+ PR_ASSERT(sd != NULL);
+ PR_ASSERT(sd->lower != NULL);
+
+ return sd->lower->methods->sendfile(
+ sd->lower, sfd, flags, timeout);
+}
+
/* Methods for the top of the stack. Just call down to the next fd. */
static PRIOMethods pl_methods = {
PR_DESC_LAYERED,
@@ -386,7 +397,13 @@ static PRIOMethods pl_methods = {
pl_DefGetsockopt,
pl_DefSetsockopt,
pl_DefGetsocketoption,
- pl_DefSetsocketoption
+ pl_DefSetsocketoption,
+ pl_DefSendfile,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt
};
PR_IMPLEMENT(const PRIOMethods*) PR_GetDefaultIOMethods()