diff options
author | jbj <devnull@localhost> | 2004-11-05 16:00:31 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2004-11-05 16:00:31 +0000 |
commit | 368da1cf2677927f1d59b96a074b5cb6cffc04b3 (patch) | |
tree | 5a0ce8f231eaba4466108700f4c8249c85ae12db /rpmio/url.c | |
parent | 04724d83c32a5cb9fe7ee4cd5411d60e768e26d3 (diff) | |
download | librpm-tizen-368da1cf2677927f1d59b96a074b5cb6cffc04b3.tar.gz librpm-tizen-368da1cf2677927f1d59b96a074b5cb6cffc04b3.tar.bz2 librpm-tizen-368da1cf2677927f1d59b96a074b5cb6cffc04b3.zip |
Store server capabilities and lockstore in urlinfo.
Attach urlinfo to fetch context prior to ripping ne_parse_uri.
Substitute /u->service/u->scheme/ everywhere to conform with modern usage.
Splint clean.
CVS patchset: 7543
CVS date: 2004/11/05 16:00:31
Diffstat (limited to 'rpmio/url.c')
-rw-r--r-- | rpmio/url.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/rpmio/url.c b/rpmio/url.c index 7e5c5032b..7dd05dfb9 100644 --- a/rpmio/url.c +++ b/rpmio/url.c @@ -120,7 +120,7 @@ URLDBGREFS(0, (stderr, "--> url %p -- %d %s at %s:%u\n", u, u->nrefs, msg, file, if (u->ctrl) fprintf(stderr, _("warning: u %p ctrl %p nrefs != 0 (%s %s)\n"), u, u->ctrl, (u->host ? u->host : ""), - (u->service ? u->service : "")); + (u->scheme ? u->scheme : "")); /*@=usereleased@*/ } if (u->data) { @@ -140,12 +140,12 @@ URLDBGREFS(0, (stderr, "--> url %p -- %d %s at %s:%u\n", u, u->nrefs, msg, file, if (u->data) fprintf(stderr, _("warning: u %p data %p nrefs != 0 (%s %s)\n"), u, u->data, (u->host ? u->host : ""), - (u->service ? u->service : "")); + (u->scheme ? u->scheme : "")); /*@=usereleased@*/ } u->buf = _free(u->buf); u->url = _free(u->url); - u->service = _free((void *)u->service); + u->scheme = _free((void *)u->scheme); u->user = _free((void *)u->user); u->password = _free((void *)u->password); u->host = _free((void *)u->host); @@ -170,7 +170,7 @@ void urlFreeCache(void) _("warning: _url_cache[%d] %p nrefs(%d) != 1 (%s %s)\n"), i, _url_cache[i], _url_cache[i]->nrefs, (_url_cache[i]->host ? _url_cache[i]->host : ""), - (_url_cache[i]->service ? _url_cache[i]->service : "")); + (_url_cache[i]->scheme ? _url_cache[i]->scheme : "")); } } _url_cache = _free(_url_cache); @@ -218,7 +218,7 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) * a) both items are not NULL and don't compare. * b) either of the items is not NULL. */ - if (urlStrcmp(u->service, ou->service)) + if (urlStrcmp(u->scheme, ou->scheme)) continue; if (urlStrcmp(u->host, ou->host)) continue; @@ -292,7 +292,7 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) int port = strtol(proxy, &end, 0); if (!(end && *end == '\0')) { fprintf(stderr, _("error: %sport must be a number\n"), - (u->service ? u->service : "")); + (u->scheme ? u->scheme : "")); return; } u->proxyp = port; @@ -318,7 +318,7 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) int port = strtol(proxy, &end, 0); if (!(end && *end == '\0')) { fprintf(stderr, _("error: %sport must be a number\n"), - (u->service ? u->service : "")); + (u->scheme ? u->scheme : "")); return; } u->proxyp = port; @@ -415,7 +415,7 @@ urltype urlPath(const char * url, const char ** pathp) /* * Split URL into components. The URL can look like - * service://user:password@host:port/path + * scheme://user:password@host:port/path */ /*@-bounds@*/ /*@-modfilesys@*/ @@ -441,10 +441,10 @@ int urlSplit(const char * url, urlinfo *uret) while (1) { /* Point to end of next item */ while (*se && *se != '/') se++; - /* Item was service. Save service and go for the rest ...*/ + /* Item was scheme. Save scheme and go for the rest ...*/ if (*se && (se != s) && se[-1] == ':' && se[0] == '/' && se[1] == '/') { se[-1] = '\0'; - u->service = xstrdup(s); + u->scheme = xstrdup(s); se += 2; /* skip over "//" */ s = se++; continue; @@ -491,10 +491,10 @@ int urlSplit(const char * url, urlinfo *uret) } u->host = xstrdup(f); - if (u->port < 0 && u->service != NULL) { + if (u->port < 0 && u->scheme != NULL) { struct servent *serv; /*@-multithreaded -moduncon @*/ - serv = getservbyname(u->service, "tcp"); + serv = getservbyname(u->scheme, "tcp"); /*@=multithreaded =moduncon @*/ if (serv != NULL) u->port = ntohs(serv->s_port); |