projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0fce352
)
ensure Pool and Repo are consistent
author
Klaus Kaempf
<kkaempf@suse.de>
Tue, 21 Oct 2008 07:13:30 +0000
(07:13 +0000)
committer
Klaus Kaempf
<kkaempf@suse.de>
Tue, 21 Oct 2008 07:13:30 +0000
(07:13 +0000)
src/repodata.c
patch
|
blob
|
history
diff --git
a/src/repodata.c
b/src/repodata.c
index
8e2c88b
..
71cd5cb
100644
(file)
--- a/
src/repodata.c
+++ b/
src/repodata.c
@@
-952,11
+952,28
@@
enum {
di_entersolvablekey
};
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;
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;
if (match)
{
int error;