Changeset f85ed4b in mainline for uspace/srv/net/dnsres/query.c


Ignore:
Timestamp:
2012-08-12T17:51:26Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
08a6382
Parents:
adae30d
Message:

Fixes: initialize off, increment lsize.

File:
1 edited

Legend:

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

    radae30d rf85ed4b  
    3939#include "dns_type.h"
    4040#include "query.h"
     41#include "transport.h"
    4142
    4243static uint16_t msg_id;
    4344
    44 int dns_name2host(char *name, dns_host_info_t *info)
     45int dns_name2host(const char *name, dns_host_info_t *info)
    4546{
    4647        dns_message_t msg;
     48        dns_message_t *amsg;
    4749        dns_question_t question;
     50        int rc;
    4851
    49         question.qname = name;
     52        question.qname = (char *)name;
    5053        question.qtype = DTYPE_A;
    5154        question.qclass = DC_IN;
    5255
    5356        list_initialize(&msg.question);
    54         list_append(question.msg, &msg.question);
     57        list_append(&question.msg, &msg.question);
    5558
    5659        msg.id = msg_id++;
     
    6265        msg.ra = false;
    6366
     67        rc = dns_request(&msg, &amsg);
     68        if (rc != EOK)
     69                return rc;
     70
    6471        return EOK;
    6572}
Note: See TracChangeset for help on using the changeset viewer.