From 290236e47126c830e5a3ee937720f1b747a89a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 14 Oct 2008 02:54:49 +0000 Subject: [PATCH] add krb5_clear_error_message git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23907 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/error_string.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/krb5/error_string.c b/lib/krb5/error_string.c index 32f443158..3d990cd04 100644 --- a/lib/krb5/error_string.c +++ b/lib/krb5/error_string.c @@ -38,8 +38,16 @@ RCSID("$Id$"); #undef __attribute__ #define __attribute__(X) +/** + * Clears the error message from the Kerberos 5 context. + * + * @param context The Kerberos 5 context to clear + * + * @ingroup krb5_error + */ + void KRB5_LIB_FUNCTION -krb5_clear_error_string(krb5_context context) +krb5_clear_error_message(krb5_context context) { HEIMDAL_MUTEX_lock(context->mutex); if (context->error_string) @@ -91,7 +99,7 @@ krb5_vset_error_message (krb5_context context, krb5_error_code ret, __attribute__ ((format (printf, 3, 0))) { - krb5_clear_error_string(context); + krb5_clear_error_message(context); HEIMDAL_MUTEX_lock(context->mutex); context->error_code = ret; vasprintf(&context->error_string, fmt, args); @@ -249,4 +257,11 @@ krb5_vset_error_string(krb5_context context, const char *fmt, va_list args) return 0; } +void KRB5_LIB_FUNCTION +krb5_clear_error_string(krb5_context context) + __attribute__((deprecated)) +{ + return krb5_clear_error_message(context); +} + #endif /* !HEIMDAL_SMALLER */