mirror of https://github.com/getdnsapi/getdns.git
Adjust for invalid parameter when address_type or address_data is invalid
This commit is contained in:
parent
6c154c8333
commit
96a38239cf
|
@ -184,7 +184,7 @@
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* dict in address contains invalid address_type
|
* dict in address contains invalid address_type
|
||||||
* expect: GETDNS_RETURN_GENERIC_ERROR
|
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||||
*/
|
*/
|
||||||
struct getdns_context *context = NULL;
|
struct getdns_context *context = NULL;
|
||||||
struct getdns_dict *address = NULL;
|
struct getdns_dict *address = NULL;
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
|
|
||||||
ASSERT_RC(getdns_hostname(context, address, NULL,
|
ASSERT_RC(getdns_hostname(context, address, NULL,
|
||||||
NULL, &transaction_id, callbackfn),
|
NULL, &transaction_id, callbackfn),
|
||||||
GETDNS_RETURN_GENERIC_ERROR, "Return code from getdns_hostname()");
|
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_hostname()");
|
||||||
|
|
||||||
RUN_EVENT_LOOP;
|
RUN_EVENT_LOOP;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* dict in address contains invalid address_data
|
* dict in address contains invalid address_data
|
||||||
* expect: GETDNS_RETURN_GENERIC_ERROR
|
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||||
*/
|
*/
|
||||||
struct getdns_context *context = NULL;
|
struct getdns_context *context = NULL;
|
||||||
struct getdns_dict *address = NULL;
|
struct getdns_dict *address = NULL;
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
|
|
||||||
ASSERT_RC(getdns_hostname(context, address, NULL,
|
ASSERT_RC(getdns_hostname(context, address, NULL,
|
||||||
NULL, &transaction_id, callbackfn),
|
NULL, &transaction_id, callbackfn),
|
||||||
GETDNS_RETURN_GENERIC_ERROR, "Return code from getdns_hostname()");
|
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_hostname()");
|
||||||
|
|
||||||
RUN_EVENT_LOOP;
|
RUN_EVENT_LOOP;
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* dict in address contains invalid address_type
|
* dict in address contains invalid address_type
|
||||||
* expect: GETDNS_RETURN_WRONG_TYPE_REQUESTED
|
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||||
*/
|
*/
|
||||||
struct getdns_context *context = NULL;
|
struct getdns_context *context = NULL;
|
||||||
struct getdns_dict *address = NULL;
|
struct getdns_dict *address = NULL;
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
GETDNS_RETURN_GOOD, "Return code from getdns_dict_set_bindata()");
|
GETDNS_RETURN_GOOD, "Return code from getdns_dict_set_bindata()");
|
||||||
|
|
||||||
ASSERT_RC(getdns_hostname_sync(context, address, NULL, &response),
|
ASSERT_RC(getdns_hostname_sync(context, address, NULL, &response),
|
||||||
GETDNS_RETURN_GENERIC_ERROR, "Return code from getdns_hostname_sync()");
|
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_hostname_sync()");
|
||||||
|
|
||||||
DICT_DESTROY(address);
|
DICT_DESTROY(address);
|
||||||
CONTEXT_DESTROY;
|
CONTEXT_DESTROY;
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* dict in address contains invalid address_data
|
* dict in address contains invalid address_data
|
||||||
* expect: GETDNS_RETURN_GENERIC_ERROR
|
* expect: GETDNS_RETURN_INVALID_PARAMETER
|
||||||
*/
|
*/
|
||||||
struct getdns_context *context = NULL;
|
struct getdns_context *context = NULL;
|
||||||
struct getdns_dict *address = NULL;
|
struct getdns_dict *address = NULL;
|
||||||
|
@ -229,7 +229,7 @@
|
||||||
GETDNS_RETURN_GOOD, "Return code from getdns_dict_set_bindata()");
|
GETDNS_RETURN_GOOD, "Return code from getdns_dict_set_bindata()");
|
||||||
|
|
||||||
ASSERT_RC(getdns_hostname_sync(context, address, NULL, &response),
|
ASSERT_RC(getdns_hostname_sync(context, address, NULL, &response),
|
||||||
GETDNS_RETURN_GENERIC_ERROR, "Return code from getdns_hostname_sync()");
|
GETDNS_RETURN_INVALID_PARAMETER, "Return code from getdns_hostname_sync()");
|
||||||
|
|
||||||
DICT_DESTROY(address);
|
DICT_DESTROY(address);
|
||||||
CONTEXT_DESTROY;
|
CONTEXT_DESTROY;
|
||||||
|
|
Loading…
Reference in New Issue