Skip to content

Commit

Permalink
Fix utility functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Apr 7, 2014
1 parent 17d9ba3 commit 5516184
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,21 @@ rdns_resolver_parse_resolv_conf (struct rdns_resolver *resolver, const char *pat
bool
rdns_request_has_type (struct rdns_request *req, enum rdns_request_type type)
{
return ((req->type & type) != 0);
unsigned int i;

for (i = 0; i < req->qcount; i ++) {
if (req->requested_names[i].type == type) {
return true;
}
}

return false;
}

const char*
rdns_request_get_name (struct rdns_request *req)
{
return NULL;
return req->requested_names[0].name;
}

char *
Expand Down

0 comments on commit 5516184

Please sign in to comment.