diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h index b6b8735565..48ecd9d10e 100644 --- a/lib/isc/include/isc/result.h +++ b/lib/isc/include/isc/result.h @@ -17,6 +17,9 @@ typedef unsigned int isc_result_t; #define ISC_R_NETDOWN 10 #define ISC_R_HOSTDOWN 11 #define ISC_R_CONNREFUSED 12 +#define ISC_R_NORESOURCES 13 /* not enough resources */ +#define ISC_R_LAST_ENTRY 13 /* last entry in the file */ + #define ISC_R_UNEXPECTED 0xFFFFFFFFL #define isc_result_totext __isc_result_totext diff --git a/lib/isc/result.c b/lib/isc/result.c index bfeef68fd2..d048dfa7f0 100644 --- a/lib/isc/result.c +++ b/lib/isc/result.c @@ -1,9 +1,7 @@ #include -#define LAST_ENTRY ISC_R_CONNREFUSED - -static char *text_table[LAST_ENTRY+1] = { +static char *text_table[ISC_R_LAST_ENTRY + 1] = { "success", "out of memory", "timed out", @@ -17,13 +15,14 @@ static char *text_table[LAST_ENTRY+1] = { "network down", "host down", "connection refused", + "not enough free resources", }; char * isc_result_totext(isc_result_t result) { if (result == ISC_R_UNEXPECTED) return ("unexpected error"); - if (result > LAST_ENTRY) + if (result > ISC_R_LAST_ENTRY) return ("unknown result code"); return (text_table[result]); }