]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Patch from Neel Goyal to fix async id assignment if callback
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 5 Nov 2013 21:16:02 +0000 (21:16 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 5 Nov 2013 21:16:02 +0000 (21:16 +0000)
  is called by libunbound in the mesh attach.

git-svn-id: file:///svn/unbound/trunk@3013 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/libworker.c

index 111e720e74ee9b08ac84aa7da2aae0024a5fc57f..542a5717488aabe2190c2f7bfe0d3c4707293735 100644 (file)
@@ -1,3 +1,7 @@
+5 Nov 2013: Wouter
+       - Patch from Neel Goyal to fix async id assignment if callback
+         is called by libunbound in the mesh attach.
+
 4 Nov 2013: Wouter
        - Patch from Neel Goyal to fix callback in libunbound.
 
index a855b796866c58635c5afd8c722991ac601a13ff..74a6476e314113d84398904dfdd3ef364f9c59e8 100644 (file)
@@ -679,14 +679,14 @@ int libworker_attach_mesh(struct ub_ctx* ctx, struct ctx_query* q,
                return UB_NOERROR;
        }
        /* process new query */
+       if(async_id)
+               *async_id = q->querynum;
        if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns, 
                w->back->udp_buff, qid, libworker_event_done_cb, q)) {
                free(qinfo.qname);
                return UB_NOMEM;
        }
        free(qinfo.qname);
-       if(async_id)
-               *async_id = q->querynum;
        return UB_NOERROR;
 }