Changeset c7cb2706c8c9efa28ec98e664f1ba670d7d6e5bb
- Timestamp:
- 12/02/10 19:00:18
(2 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1291316418 +0000
- git-parent:
[cb978e5289aaa3d758cf509f555d119da95e82ad]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1291316418 +0000
- Message:
debug the abitrary nameserver dns context reaping
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra5e761d |
rc7cb270 |
|
| 91 | 91 | dns_ctx_handle_t *h = data; |
|---|
| 92 | 92 | eventer_t e = NULL, newe = NULL; |
|---|
| 93 | | if(ctx == NULL) e = eventer_remove(h->timeout); |
|---|
| | 93 | if(h == NULL) return; |
|---|
| | 94 | if(ctx == NULL) { |
|---|
| | 95 | if(h->timeout) e = eventer_remove(h->timeout); |
|---|
| | 96 | } |
|---|
| 94 | 97 | else { |
|---|
| 95 | 98 | assert(h->ctx == ctx); |
|---|
| … | … | |
| 111 | 114 | static void dns_ctx_handle_free(void *vh) { |
|---|
| 112 | 115 | dns_ctx_handle_t *h = vh; |
|---|
| 113 | | assert(h->timeout == NULL); |
|---|
| 114 | 116 | free(h->ns); |
|---|
| | 117 | eventer_remove_fd(h->e->fd); |
|---|
| | 118 | eventer_free(h->e); |
|---|
| | 119 | h->e = NULL; |
|---|
| | 120 | if(h->timeout) { |
|---|
| | 121 | eventer_remove(h->timeout); |
|---|
| | 122 | eventer_free(h->timeout); |
|---|
| | 123 | h->timeout = NULL; |
|---|
| | 124 | } |
|---|
| 115 | 125 | dns_close(h->ctx); |
|---|
| 116 | 126 | dns_free(h->ctx); |
|---|
| | 127 | assert(h->timeout == NULL); |
|---|
| | 128 | free(h); |
|---|
| 117 | 129 | } |
|---|
| 118 | 130 | |
|---|
| … | … | |
| 200 | 212 | ci = get_ci(L); |
|---|
| 201 | 213 | assert(ci); |
|---|
| 202 | | |
|---|
| | 214 | if(lua_gettop(L) > 0) |
|---|
| | 215 | nameserver = lua_tostring(L, 1); |
|---|
| 203 | 216 | holder = (dns_lookup_ctx_t **)lua_newuserdata(L, sizeof(*holder)); |
|---|
| 204 | 217 | dlc = calloc(1, sizeof(*dlc)); |
|---|