Changeset a0d97f83 in mainline for uspace/srv/net/dnsrsrv/query.c
- Timestamp:
- 2013-05-03T08:44:14Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ef904895
- Parents:
- 48171fc4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dnsrsrv/query.c
r48171fc4 ra0d97f83 52 52 dns_message_t *msg; 53 53 dns_message_t *amsg; 54 dns_question_t question;54 dns_question_t *question; 55 55 dns_host_info_t *info; 56 56 int rc; 57 57 58 question .qname = (char *)name;59 question.qtype = DTYPE_A;60 question.qclass = DC_IN;58 question = calloc(1, sizeof(dns_question_t)); 59 if (question == NULL) 60 return ENOMEM; 61 61 62 msg = calloc(1, sizeof(dns_message_t)); 62 question->qname = (char *)name; 63 question->qtype = DTYPE_A; 64 question->qclass = DC_IN; 65 66 msg = dns_message_new(); 63 67 if (msg == NULL) 64 68 return ENOMEM; 65 69 66 list_initialize(&msg->question); 67 list_append(&question.msg, &msg->question); 70 list_append(&question->msg, &msg->question); 68 71 69 72 msg->id = msg_id++; … … 100 103 info->addr.ipv4); 101 104 105 dns_message_destroy(msg); 102 106 dns_message_destroy(amsg); 103 107 *rinfo = info;
Note:
See TracChangeset
for help on using the changeset viewer.