char *fn = NULL;
if (dict == NULL)
- if (ctx->config != NULL)
+ if (ctx->config != NULL && ctx->config->dictionary)
dict = ctx->config->dictionary;
if (dict == NULL)
if (dict_init (dirname (dir), basename (fn)) < 0)
{
- r = rs_err_ctx_push_fl (ctx, RSE_FR, __FILE__, __LINE__, "dict_init");
+ r = rs_err_ctx_push_fl (ctx, RSE_FR, __FILE__, __LINE__,
+ "failing dict_init(\"%s\")", dict);
goto out;
}
return r;
}
-struct rs_error * /* FIXME: Return int as all the others? */
-rs_resolv (struct evutil_addrinfo **addr,
- rs_conn_type_t type,
- const char *hostname,
- const char *service)
+struct rs_error *
+rs_resolve (struct evutil_addrinfo **addr,
+ rs_conn_type_t type,
+ const char *hostname,
+ const char *service)
{
int err;
struct evutil_addrinfo hints, *res = NULL;
for (p = r->peers; p; )
{
struct rs_peer *tmp = p;
- if (p->addr)
- evutil_freeaddrinfo (p->addr);
+ if (p->addr_cache)
+ {
+ evutil_freeaddrinfo (p->addr_cache);
+ p->addr_cache = NULL;
+ }
p = p->next;
rs_free (ctx, tmp);
}
free (r->name);
+ rs_free (ctx, r->transport_cred);
r = r->next;
rs_free (ctx, tmp);
}