mirror of https://github.com/getdnsapi/getdns.git
append_bindata was also used marginally
This commit is contained in:
parent
4e0ee15b73
commit
eea6ad7beb
11
src/list.c
11
src/list.c
|
@ -344,8 +344,9 @@ _getdns_list_copy(const struct getdns_list * srclist,
|
|||
break;
|
||||
|
||||
case t_bindata:
|
||||
retval = _getdns_list_append_bindata(*dstlist,
|
||||
srclist->items[i].data.bindata);
|
||||
retval = _getdns_list_append_const_bindata(*dstlist,
|
||||
srclist->items[i].data.bindata->size,
|
||||
srclist->items[i].data.bindata->data);
|
||||
break;
|
||||
|
||||
case t_dict:
|
||||
|
@ -622,12 +623,6 @@ _getdns_list_append_list(getdns_list *list, const getdns_list *child_list)
|
|||
return getdns_list_set_list(list, list->numinuse, child_list);
|
||||
}
|
||||
getdns_return_t
|
||||
_getdns_list_append_bindata(getdns_list *list, const getdns_bindata *child_bindata)
|
||||
{
|
||||
if (!list) return GETDNS_RETURN_INVALID_PARAMETER;
|
||||
return getdns_list_set_bindata(list, list->numinuse, child_bindata);
|
||||
}
|
||||
getdns_return_t
|
||||
_getdns_list_append_const_bindata(
|
||||
getdns_list *list, size_t size, const void *data)
|
||||
{
|
||||
|
|
|
@ -850,7 +850,6 @@ _getdns_create_getdns_response(getdns_dns_req *completed_request)
|
|||
getdns_dict *reply;
|
||||
getdns_bindata *canonical_name = NULL;
|
||||
int nreplies = 0, nanswers = 0, nsecure = 0, ninsecure = 0, nbogus = 0;
|
||||
getdns_bindata full_data;
|
||||
getdns_dict *netreq_debug;
|
||||
|
||||
/* info (bools) about dns_req */
|
||||
|
@ -973,10 +972,8 @@ _getdns_create_getdns_response(getdns_dns_req *completed_request)
|
|||
|
||||
getdns_dict_destroy(reply);
|
||||
|
||||
/* buffer */
|
||||
full_data.data = netreq->response;
|
||||
full_data.size = netreq->response_len;
|
||||
if (_getdns_list_append_bindata(replies_full, &full_data))
|
||||
if (_getdns_list_append_const_bindata(replies_full,
|
||||
netreq->response_len, netreq->response))
|
||||
goto error;
|
||||
}
|
||||
if (_getdns_dict_set_this_list(result, "replies_tree", replies_tree))
|
||||
|
|
|
@ -75,8 +75,7 @@ getdns_return_t _getdns_list_append_dict(getdns_list *list,
|
|||
const getdns_dict *child_dict);
|
||||
getdns_return_t _getdns_list_append_list(getdns_list *list,
|
||||
const getdns_list *child_list);
|
||||
getdns_return_t _getdns_list_append_bindata(getdns_list *list,
|
||||
const getdns_bindata *child_bindata);
|
||||
|
||||
getdns_return_t _getdns_list_append_string(getdns_list *list,
|
||||
const char *value);
|
||||
|
||||
|
|
Loading…
Reference in New Issue