]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
nicer walk_supers.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Aug 2007 12:22:29 +0000 (12:22 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 2 Aug 2007 12:22:29 +0000 (12:22 +0000)
git-svn-id: file:///svn/unbound/trunk@480 be551aaa-1e26-0410-a405-d3ace91eadb9

services/mesh.c
services/mesh.h

index 7ec5a82b2b8f576610293a10db044a4f68b82399..308f1d38f92e2be19371ddf72747e7d5c291df06 100644 (file)
@@ -473,17 +473,15 @@ void mesh_query_done(struct mesh_state* mstate)
        }
 }
 
-void mesh_walk_supers(struct module_qstate* qstate, int id)
+void mesh_walk_supers(struct mesh_area* mesh, struct mesh_state* mstate)
 {
-       struct mesh_state* m = qstate->mesh_info;
-       struct mesh_area* mesh = m->s.env->mesh;
        struct mesh_state_ref* ref;
-       RBTREE_FOR(ref, struct mesh_state_ref*, &qstate->mesh_info->super_set)
+       RBTREE_FOR(ref, struct mesh_state_ref*, &mstate->super_set)
        {
                /* make super runnable */
                (void)rbtree_insert(&mesh->run, &ref->s->run_node);
                /* callback the function to inform super of result */
-               (*mesh->modfunc[ref->s->s.curmod]->inform_super)(qstate
+               (*mesh->modfunc[ref->s->s.curmod]->inform_super)(&mstate->s
                        ref->s->s.curmod, &ref->s->s);
        }
 }
@@ -564,7 +562,7 @@ mesh_continue(struct mesh_area* mesh, struct mesh_state* mstate,
        if(s == module_error || s == module_finished) {
                if(mstate->s.curmod == 0) {
                        mesh_query_done(mstate);
-                       mesh_walk_supers(&mstate->s, mstate->s.curmod);
+                       mesh_walk_supers(mesh, mstate);
                        mesh_state_delete(&mstate->s);
                        return 0;
                }
index a5a048feadaaff331221719f5a656924f885f4f3..f0818e26d3ccbd67a5876fedbfbaca8bbd45318a 100644 (file)
@@ -255,10 +255,10 @@ void mesh_query_done(struct mesh_state* mstate);
  * Called when a module is module_finished or returns module_error.
  * The super query states become runnable with event module_event_pass.
  *
- * @param qstate: the state that has results, used to find mesh state.
- * @param id: module id.
+ * @param mesh: mesh area to add newly runnable modules to.
+ * @param mstate: the state that has results, used to find mesh state.
  */
-void mesh_walk_supers(struct module_qstate* qstate, int id);
+void mesh_walk_supers(struct mesh_area* mesh, struct mesh_state* mstate);
 
 /**
  * Delete mesh state, cleanup and also rbtrees and so on.