Commit 18c4d6f0 authored by Pekka Pessi's avatar Pekka Pessi

sresolv/sresolv.c: fix thread problems in sres_resolver_destroy().

sres_resolver_destroy() now always zaps su_root_t-related resources.

darcs-hash:20060516130225-65a35-b4a45ed3fba5a0cca6d5e29d56343524defbe23b.gz
parent 5fba71f5
......@@ -155,6 +155,9 @@ sres_resolver_destroy(sres_resolver_t *res)
if (srs == NULL)
return su_seterrno(EINVAL);
sres_sofia_update(srs, -1, -1); /* Remove sockets from too, zap timers. */
srs->srs_root = NULL;
sres_resolver_unref(srs->srs_resolver);
return 0;
......@@ -181,6 +184,9 @@ static int sres_sofia_update(sres_sofia_t *srs,
if (srs == NULL)
return 0;
if (srs->srs_root == NULL)
return -1;
if (old_socket == new_socket) {
if (old_socket == -1) {
sres_resolver_set_async(srs->srs_resolver, sres_sofia_update, NULL, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment