Changeset 0c2d9bb in mainline for uspace/srv/net/dnsrsrv/query.c


Ignore:
Timestamp:
2013-12-25T22:54:29Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b51cf2c
Parents:
f7a33de (diff), ac36aed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/dnsrsrv/query.c

    rf7a33de r0c2d9bb  
    3939#include <stdlib.h>
    4040#include <str.h>
    41 #include <net/socket_codes.h>
    4241#include "dns_msg.h"
    4342#include "dns_std.h"
     
    9998        }
    10099       
    101         list_foreach(amsg->answer, link) {
    102                 dns_rr_t *rr = list_get_instance(link, dns_rr_t, msg);
    103                
     100        list_foreach(amsg->answer, msg, dns_rr_t, rr) {
    104101                log_msg(LOG_DEFAULT, LVL_DEBUG, " - '%s' %u/%u, dsize %zu",
    105102                    rr->name, rr->rtype, rr->rclass, rr->rdata_size);
     
    192189}
    193190
    194 int dns_name2host(const char *name, dns_host_info_t **rinfo, uint16_t af)
     191int dns_name2host(const char *name, dns_host_info_t **rinfo, ip_ver_t ver)
    195192{
    196193        dns_host_info_t *info = calloc(1, sizeof(dns_host_info_t));
     
    200197        int rc;
    201198       
    202         switch (af) {
    203         case AF_NONE:
     199        switch (ver) {
     200        case ip_any:
    204201                rc = dns_name_query(name, DTYPE_AAAA, info);
    205202               
     
    208205               
    209206                break;
    210         case AF_INET:
     207        case ip_v4:
    211208                rc = dns_name_query(name, DTYPE_A, info);
    212209                break;
    213         case AF_INET6:
     210        case ip_v6:
    214211                rc = dns_name_query(name, DTYPE_AAAA, info);
    215212                break;
Note: See TracChangeset for help on using the changeset viewer.