src/context.c
static getdns_return_t
create_default_dns_transports(getdns_context *context)
{
	if (!( context->dns_transports
	     = GETDNS_XMALLOC(context->my_mf, getdns_transport_list_t, 2)))
		return GETDNS_RETURN_MEMORY_ERROR;

	context->dns_transports[0] = GETDNS_TRANSPORT_UDP;
	context->dns_transports[1] = GETDNS_TRANSPORT_TCP;
	context->dns_transport_count = 2;

	return GETDNS_RETURN_GOOD;
}
/**
 * Helper to get default transports.
 */
Helper to get default transports.
Helper to get default transports .
static getdns_return_t
create_default_dns_transports(getdns_context *context)
{
	if (!( context->dns_transports
	     = GETDNS_XMALLOC(context->my_mf, getdns_transport_list_t, 2)))
		return GETDNS_RETURN_MEMORY_ERROR;
	context->dns_transports[0] = GETDNS_TRANSPORT_UDP;
	context->dns_transports[1] = GETDNS_TRANSPORT_TCP;
	context->dns_transport_count = 2;
	return GETDNS_RETURN_GOOD;
}
static getdns_return_t create_default_dns_transports ( getdns_context * context ) { if ( ! ( context -> dns_transports = GETDNS_XMALLOC ( context -> my_mf , getdns_transport_list_t , 2 ) ) ) return GETDNS_RETURN_MEMORY_ERROR ; context -> dns_transports [ 0 ] = GETDNS_TRANSPORT_UDP ; context -> dns_transports [ 1 ] = GETDNS_TRANSPORT_TCP ; context -> dns_transport_count = 2 ; return GETDNS_RETURN_GOOD ; }
Helper to get default transports.
Helper to get default transports .