mirror of https://github.com/getdnsapi/getdns.git
Update hostname to return inv parameter. Return proper code in list get length methods.
This commit is contained in:
parent
86896652a8
commit
c8b16f0590
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* \file hostname.c
|
||||
* @brief getdns core functions
|
||||
*
|
||||
*
|
||||
* Originally taken from the getdns API description pseudo implementation.
|
||||
*
|
||||
*/
|
||||
|
@ -80,9 +80,9 @@ getdns_hostname(struct getdns_context *context,
|
|||
&& address_data->size == 16))
|
||||
req_type = GETDNS_RRTYPE_PTR;
|
||||
else
|
||||
return GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||
return GETDNS_RETURN_INVALID_PARAMETER;
|
||||
if ((name = reverse_address(address_data)) == NULL)
|
||||
return GETDNS_RETURN_GENERIC_ERROR;
|
||||
return GETDNS_RETURN_INVALID_PARAMETER;
|
||||
retval = getdns_general(context, name, req_type, extensions,
|
||||
userarg, transaction_id, callback);
|
||||
free(name);
|
||||
|
|
|
@ -44,7 +44,7 @@ getdns_return_t
|
|||
getdns_list_get_length(const struct getdns_list * list, size_t * answer)
|
||||
{
|
||||
if (!list || !answer)
|
||||
return GETDNS_RETURN_NO_SUCH_LIST_ITEM;
|
||||
return GETDNS_RETURN_INVALID_PARAMETER;
|
||||
|
||||
*answer = list->numinuse;
|
||||
return GETDNS_RETURN_GOOD;;
|
||||
|
|
|
@ -160,9 +160,9 @@ getdns_hostname_sync(struct getdns_context *context,
|
|||
&& address_data->size == 16))
|
||||
req_type = GETDNS_RRTYPE_PTR;
|
||||
else
|
||||
return GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||
return GETDNS_RETURN_INVALID_PARAMETER;
|
||||
if ((name = reverse_address(address_data)) == NULL)
|
||||
return GETDNS_RETURN_GENERIC_ERROR;
|
||||
return GETDNS_RETURN_INVALID_PARAMETER;
|
||||
retval = getdns_general_sync(context, name, req_type, extensions,
|
||||
response);
|
||||
free(name);
|
||||
|
|
Loading…
Reference in New Issue