Author: kkaempf Date: Tue Oct 21 09:13:30 2008 New Revision: 11424 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11424&view=rev Log: ensure Pool and Repo are consistent Modified: trunk/sat-solver/src/repodata.c Modified: trunk/sat-solver/src/repodata.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repodata.c?rev=11424&r1=11423&r2=11424&view=diff ============================================================================== --- trunk/sat-solver/src/repodata.c (original) +++ trunk/sat-solver/src/repodata.c Tue Oct 21 09:13:30 2008 @@ -952,11 +952,28 @@ di_entersolvablekey }; +/* see repo.h for documentation */ int dataiterator_init(Dataiterator *di, Pool *pool, Repo *repo, Id p, Id keyname, const char *match, int flags) { memset(di, 0, sizeof(*di)); di->pool = pool; + if (!pool) + { + fprintf(stderr, "dataiterator_init: no Pool given\n"); + di->state = di_bye; + return -1; + } + if (repo) + { + if (repo->pool != pool) + { + fprintf(stderr, "dataiterator_init: repo from different pool\n"); + di->state = di_bye; + return -1; + } + + } if (match) { int error; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org