chiark / gitweb /
site: Explicitly track name resolution status
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 13 May 2014 20:17:20 +0000 (21:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 May 2014 13:53:13 +0000 (14:53 +0100)
commit5c19b79c7c817a28a1582970b2685c98e05b2de5
treea704a927f2eeb6e398ec9f9bf5d3b33c7b4d06ea
parent75829536d59e3efdb592aee1effcedb72d9a8cc6
site: Explicitly track name resolution status

Introduce a new variable st->resolving which tracks whether we have an
outstanding name resolution request.  This makes it safe to (try to)
start name resolution (via the new function ensure_resolving) multiple
times etc.

No resulting functional change from just this patch.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
Changes in v2:
  * Do slightly complicated dance with st->resolving, which is needed
    because of the reentrancy hazard posted by resolver->request.  In
    v1 of the series there was a bug here which could cause the site
    state machine to lock up.
site.c