Fix for issue 54: set_ub_dns_transport() not working

This commit is contained in:
John Dickinson 2014-08-10 14:59:03 +00:00
parent fb59ecd054
commit 51d04447ea
1 changed files with 6 additions and 6 deletions

View File

@ -725,16 +725,16 @@ set_ub_dns_transport(struct getdns_context* context,
getdns_transport_t value) { getdns_transport_t value) {
switch (value) { switch (value) {
case GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP: case GETDNS_TRANSPORT_UDP_FIRST_AND_FALL_BACK_TO_TCP:
set_ub_string_opt(context, "do-udp", "yes"); set_ub_string_opt(context, "do-udp:", "yes");
set_ub_string_opt(context, "do-tcp", "yes"); set_ub_string_opt(context, "do-tcp:", "yes");
break; break;
case GETDNS_TRANSPORT_UDP_ONLY: case GETDNS_TRANSPORT_UDP_ONLY:
set_ub_string_opt(context, "do-udp", "yes"); set_ub_string_opt(context, "do-udp:", "yes");
set_ub_string_opt(context, "do-tcp", "no"); set_ub_string_opt(context, "do-tcp:", "no");
break; break;
case GETDNS_TRANSPORT_TCP_ONLY: case GETDNS_TRANSPORT_TCP_ONLY:
set_ub_string_opt(context, "do-udp", "no"); set_ub_string_opt(context, "do-udp:", "no");
set_ub_string_opt(context, "do-tcp", "yes"); set_ub_string_opt(context, "do-tcp:", "yes");
break; break;
default: default:
/* TODO GETDNS_CONTEXT_TCP_ONLY_KEEP_CONNECTIONS_OPEN */ /* TODO GETDNS_CONTEXT_TCP_ONLY_KEEP_CONNECTIONS_OPEN */