1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 22:15:13 -05:00

doh: add error message for DOH_DNS_NAME_TOO_LONG

When this error code was introduced in b6a53fff6c, it was
forgotten to be added in the errors array and doh_strerror function.

Closes #5863
This commit is contained in:
Emil Engler 2020-08-26 13:33:42 +02:00 committed by Daniel Stenberg
parent 7691f68ba3
commit a6a17662f2
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -57,12 +57,13 @@ static const char * const errors[]={
"Unexpected TYPE",
"Unexpected CLASS",
"No content",
"Bad ID"
"Bad ID",
"Name too long"
};
static const char *doh_strerror(DOHcode code)
{
if((code >= DOH_OK) && (code <= DOH_DNS_BAD_ID))
if((code >= DOH_OK) && (code <= DOH_DNS_NAME_TOO_LONG))
return errors[code];
return "bad error code";
}