From 4562f44f9bac793b8397fdf35491da5d7ef815fa Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Tue, 14 Jul 2009 09:33:32 +0300 Subject: bstream: make tokenizable and load index using bstream some fixes on index reading code too. --- src/index.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/index.c') 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; } -- cgit v1.2.3-70-g09d2