RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [email protected] Module: rpm Date: 05-Jul-2009 14:03:50 Branch: HEAD Handle: 2009070512034900 Modified files: rpm/rpmio rpmdav.c Log: - rpmdav: fix: replace original with current URI path. more to do ... Summary: Revision Changes Path 2.102 +18 -1 rpm/rpmio/rpmdav.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/rpmdav.c ============================================================================ $ cvs diff -u -r2.101 -r2.102 rpmdav.c --- rpm/rpmio/rpmdav.c 4 Jul 2009 14:35:39 -0000 2.101 +++ rpm/rpmio/rpmdav.c 5 Jul 2009 12:03:49 -0000 2.102 @@ -610,6 +610,8 @@ } exit: +if (_dav_debug < 0) +fprintf(stderr, "<-- %s(%s) u->url %s\n", __FUNCTION__, url, u->url); if (uret != NULL) *uret = urlLink(u, "davInit"); u = urlFree(u, "urlSplit (davInit)"); @@ -1364,6 +1366,7 @@ /*...@modifies avx, internalState @*/ { urlinfo u = NULL; +const char * u_url = NULL; /* XXX FIXME: urlFind should save current URI */ int rc; int xx; @@ -1372,6 +1375,10 @@ if (rc || u == NULL) goto exit; +if (u_url == NULL) { /* XXX FIXME: urlFind should save current URI */ +u_url = u->url; +u->url = avx->uri; +} /* * Do PROPFIND through davFetch iff server supports. * Otherwise, do HEAD to get Content-length/ETag/Last-Modified, @@ -1417,6 +1424,10 @@ *te = '\0'; u->location = _free(u->location); /* XXX retry here needed iff ContentLength:. */ +if (u_url != NULL) { /* XXX FIXME: urlFind should save current URI */ +u->url = u_url; +u_url = NULL; +} xx = davFree(u); goto retry; /*...@notreached@*/ break; @@ -1434,6 +1445,10 @@ } exit: +if (u_url != NULL) { /* XXX FIXME: urlFind should save current URI */ +u->url = u_url; +u_url = NULL; +} xx = davFree(u); return rc; } @@ -1976,6 +1991,8 @@ char buf[1024]; int rc = -1; +if (_dav_debug < 0) +fprintf(stderr, "--> davStat(%s)\n", path); if (path == NULL || *path == '\0') { errno = ENOENT; goto exit; @@ -2012,7 +2029,7 @@ exit: if (_dav_debug < 0) -fprintf(stderr, "*** davStat(%s) rc %d\n%s", path, rc, statstr(st, buf)); +fprintf(stderr, "<-- davStat(%s) rc %d\n%s", path, rc, statstr(st, buf)); avx = rpmavxFree(avx); return rc; } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository [email protected]
