summaryrefslogtreecommitdiff
path: root/rpmio/rpmdav.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpmio/rpmdav.c')
-rw-r--r--rpmio/rpmdav.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/rpmio/rpmdav.c b/rpmio/rpmdav.c
index 4f4cb79ec..ce95a2553 100644
--- a/rpmio/rpmdav.c
+++ b/rpmio/rpmdav.c
@@ -14,13 +14,6 @@
#include <neon/ne_basic.h>
#include <neon/ne_dates.h>
#include <neon/ne_locks.h>
-
-#define NEONBLOWSCHUNKS
-#ifndef NEONBLOWSCHUNKS
-/* HACK: include ne_private.h to access sess->socket for now. */
-#include "../neon/src/ne_private.h"
-#endif
-
#include <neon/ne_props.h>
#include <neon/ne_request.h>
#include <neon/ne_socket.h>
@@ -405,6 +398,7 @@ static void *fetch_destroy_item(/*@only@*/ struct fetch_resource_s *res)
return NULL;
}
+#ifdef UNUSED
/*@null@*/
static void *fetch_destroy_list(/*@only@*/ struct fetch_resource_s *res)
/*@modifies res @*/
@@ -418,6 +412,7 @@ static void *fetch_destroy_list(/*@only@*/ struct fetch_resource_s *res)
/*@=branchstate@*/
return NULL;
}
+#endif
static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const char *uri)
/*@*/
@@ -956,11 +951,15 @@ assert(ctrl->req != NULL);
davConnection, ctrl);
if (!strcmp(httpCmd, "PUT")) {
+#ifdef NOTYET /* XXX HACK no wr_chunked until libneon supports */
ctrl->wr_chunked = 1;
ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
ne_set_request_chunked(ctrl->req, 1);
/* HACK: no retries if/when chunking. */
rc = davResp(u, ctrl, NULL);
+#else
+ rc = FTPERR_SERVER_IO_ERROR;
+#endif
} else {
/* HACK: possible Last-Modified: Tue, 02 Nov 2004 14:29:36 GMT */
/* HACK: possible ETag: "inode-size-mtime" */
@@ -1065,23 +1064,13 @@ hexdump(buf, rc);
ssize_t davWrite(void * cookie, const char * buf, size_t count)
{
+#ifdef NOTYET /* XXX HACK no wr_chunked until libneon supports */
FD_t fd = cookie;
ssize_t rc;
int xx;
-#ifndef NEONBLOWSCHUNKS
- ne_session * sess;
-
-assert(fd->req != NULL);
- sess = ne_get_session(fd->req);
-assert(sess != NULL);
-
- /* HACK: include ne_private.h to access sess->socket for now. */
- xx = ne_sock_fullwrite(sess->socket, buf, count);
-#else
assert(fd->req != NULL);
xx = ne_send_request_chunk(fd->req, buf, count);
-#endif
/* HACK: stupid error impedence matching. */
rc = (xx == 0 ? count : -1);
@@ -1094,6 +1083,10 @@ hexdump(buf, count);
#endif
return rc;
+#else
+ errno = EIO; /* HACK */
+ return -1;
+#endif
}
int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)