From 7761ecce3ff09ab0ae21ac3fe72136f2cbf8ebf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 5 Jun 2007 03:53:52 +0000 Subject: [PATCH] (hx509_get_error_string): if the error code is not the one we expect, punt and use the default com_err/strerror string instead. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20912 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hx509/error.c b/lib/hx509/error.c index 650896c54..5b036525a 100644 --- a/lib/hx509/error.c +++ b/lib/hx509/error.c @@ -101,9 +101,9 @@ char * hx509_get_error_string(hx509_context context, int error_code) { struct rk_strpool *p = NULL; - hx509_error msg; + hx509_error msg = context->error; - if (context->error == NULL) { + if (msg == NULL || msg->code != error_code) { const char *cstr; char *str;