summaryrefslogtreecommitdiffstats
path: root/src/index.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-14 09:33:32 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-14 09:33:47 +0300
commit4562f44f9bac793b8397fdf35491da5d7ef815fa (patch)
treeee3b623f6ba2324909abdef26d41aabce7a9d434 /src/index.c
parente69b81f5259f532d5f5ae9c0a0f9bbd81240fbaf (diff)
downloadapk-tools-4562f44f9bac793b8397fdf35491da5d7ef815fa.tar.bz2
apk-tools-4562f44f9bac793b8397fdf35491da5d7ef815fa.tar.xz
bstream: make tokenizable and load index using bstream
some fixes on index reading code too.
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/index.c b/src/index.c
index 960c42f..b938984 100644
--- a/src/index.c
+++ b/src/index.c
@@ -41,15 +41,15 @@ static int index_parse(void *ctx, int optch, int optindex, const char *optarg)
static int index_read_file(struct apk_database *db, struct index_ctx *ictx)
{
- struct apk_istream *is;
+ struct apk_bstream *bs;
int r;
if (ictx->index_file == NULL)
return 0;
- is = apk_bstream_gunzip(apk_bstream_from_url(ictx->index_file), 1);
- if (is == NULL)
+ bs = apk_bstream_from_istream(apk_bstream_gunzip(apk_bstream_from_url(ictx->index_file), 1));
+ if (bs == NULL)
return -1;
- r = apk_db_index_read(db, is, -1);
- is->close(is);
+ r = apk_db_index_read(db, bs, -1);
+ bs->close(bs, NULL);
return r;
}