mirror of
https://github.com/monero-project/monero.git
synced 2025-05-12 14:32:14 -04:00
remerged; commands JSON. logging upgrade. doxygen
This commit is contained in:
parent
3cbdf198f1
commit
c511abf005
29 changed files with 701 additions and 242 deletions
|
@ -168,7 +168,24 @@ DNSResolver::DNSResolver() : m_data(new DNSResolverData())
|
|||
ub_ctx_resolvconf(m_data->m_ub_context, &empty_string);
|
||||
ub_ctx_hosts(m_data->m_ub_context, &empty_string);
|
||||
|
||||
ub_ctx_add_ta(m_data->m_ub_context, ::get_builtin_ds());
|
||||
#ifdef DEVELOPER_LIBUNBOUND_OLD
|
||||
#warning "Using the work around for old libunbound"
|
||||
{ // work around for bug https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=515 needed for it to compile on e.g. Debian 7
|
||||
char * ds_copy = NULL; // this will be the writable copy of string that bugged version of libunbound requires
|
||||
try {
|
||||
char * ds_copy = strdup( ::get_builtin_ds() );
|
||||
ub_ctx_add_ta(m_data->m_ub_context, ds_copy);
|
||||
} catch(...) { // probably not needed but to work correctly in every case...
|
||||
if (ds_copy) { free(ds_copy); ds_copy=NULL; } // for the strdup
|
||||
throw ;
|
||||
}
|
||||
if (ds_copy) { free(ds_copy); ds_copy=NULL; } // for the strdup
|
||||
}
|
||||
#else
|
||||
// normal version for fixed libunbound
|
||||
ub_ctx_add_ta(m_data->m_ub_context, ::get_builtin_ds() );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
DNSResolver::~DNSResolver()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue