summaryrefslogtreecommitdiff
path: root/databases/pxlib/files/patch-src-px_io.c
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2008-07-02 15:35:53 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2008-07-02 15:35:53 +0000
commitd121825bfcd6a2c0bf993b7b1e14db967bbecb80 (patch)
tree319ae5db4cb82b7b4e21ef2a5322db95402cf278 /databases/pxlib/files/patch-src-px_io.c
parentThis module allows Apache to authenticate a location against an (diff)
- Update to 0.6.3
Diffstat (limited to '')
-rw-r--r--databases/pxlib/files/patch-src-px_io.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/databases/pxlib/files/patch-src-px_io.c b/databases/pxlib/files/patch-src-px_io.c
deleted file mode 100644
index 420df4a2f7ec..000000000000
--- a/databases/pxlib/files/patch-src-px_io.c
+++ /dev/null
@@ -1,85 +0,0 @@
---- src/px_io.c.orig Sun Dec 11 13:12:58 2005
-+++ src/px_io.c Sun Dec 11 13:13:26 2005
-@@ -346,82 +346,6 @@
- */
- size_t px_mb_write(pxblob_t *p, pxstream_t *dummy, size_t len, void *buffer) {
- return(p->mb_stream->write(p->pxdoc, p->mb_stream, len, buffer));
-- pxdoc_t *pxdoc;
-- pxhead_t *pxh;
-- pxstream_t *pxs;
-- long pos;
-- int ret;
-- unsigned char *tmpbuf = NULL;
-- unsigned int blockslen, blockoffset;
--
-- pxdoc = p->pxdoc;
-- pxh = pxdoc->px_head;
-- pxs = p->mb_stream;
--
-- if (pxh->px_encryption == 0)
-- return pxs->write(pxdoc, pxs, len, buffer);
--
-- pos = pxs->tell(pxdoc, pxs);
-- if (pos < 0) {
-- return pos;
-- }
--
-- blockoffset = (pos >> BLOCKSIZEEXP) << BLOCKSIZEEXP;
-- /* We need to read at least chunk from the blockoffset till the
-- * desired postion and the data itself which has len bytes.
-- * e.g. if we want to read 20 bytes starting at position 300 in the
-- * file, we will need to read 44+20 bytes starting at position 256.
-- */
-- blockslen = len + pos - blockoffset;
-- /* Check if the end of the data is within a 2^BLOCKSIZEEXP bytes block.
-- * If that is the case, we will need to read the remainder of the
-- * 2^BLOCKSIZEEXP bytes block as well. In the above example, we
-- * will have to read 256 bytes instead of just 64.
-- */
-- if(blockslen & 0xff)
-- blockslen = ((blockslen >> BLOCKSIZEEXP) + 1) << BLOCKSIZEEXP;
--
-- assert(blockslen >= len);
-- assert(blockoffset <= (unsigned long)pos);
-- assert((blockoffset+blockslen) >= (pos+len));
--
-- ret = pxs->seek(pxdoc, pxs, blockoffset, SEEK_SET);
-- if (ret < 0) {
-- return ret;
-- }
--
-- tmpbuf = (unsigned char *) malloc(blockslen);
-- if (tmpbuf == NULL) {
-- return -ENOMEM;
-- }
--
-- ret = pxs->read(pxdoc, pxs, blockslen, tmpbuf);
-- if (ret < 0) {
-- goto end;
-- }
--
-- px_decrypt_mb_block(tmpbuf, tmpbuf, pxh->px_encryption, blockslen);
-- memcpy(tmpbuf + (pos - blockoffset), buffer, len);
-- px_encrypt_mb_block(tmpbuf, tmpbuf, pxh->px_encryption, blockslen);
--
-- ret = pxs->seek(pxdoc, pxs, blockoffset, SEEK_SET);
-- if (ret < 0) {
-- return ret;
-- }
-- ret = pxs->write(pxdoc, pxs, blockslen, tmpbuf);
-- if (ret < 0) {
-- goto end;
-- }
--
-- ret = pxs->seek(pxdoc, pxs, pos + len, SEEK_SET);
-- if (ret < 0) {
-- goto end;
-- }
--
-- ret = len;
--end:
-- free(tmpbuf);
-- return ret;
- }
- /* }}} */
-