(krb5_context context);
/* Error reporting */
-void
+void KRB5_CALLCONV_C
krb5_set_error_message (krb5_context, krb5_error_code, const char *, ...);
#ifdef va_start
-void
+void KRB5_CALLCONV
krb5_vset_error_message (krb5_context, krb5_error_code, const char *, va_list);
#endif
-char *
+/* The behavior of krb5_get_error_message is only defined the first
+ time it is called after a failed call to a krb5 function using the
+ same context, and only when the error code passed in is the same as
+ that returned by the krb5 function. Future versions may return the
+ same string for the second and following calls.
+
+ The string returned by this function must be freed using
+ krb5_free_error_message. */
+char * KRB5_CALLCONV
krb5_get_error_message (krb5_context, krb5_error_code);
-void
+void KRB5_CALLCONV
krb5_free_error_message (krb5_context, char *);
-void
+void KRB5_CALLCONV
krb5_clear_error_message (krb5_context);
#include <stdarg.h>
#include "k5-int.h"
-void
+void KRB5_CALLCONV_C
krb5_set_error_message (krb5_context ctx, krb5_error_code code,
const char *fmt, ...)
{
va_end (args);
}
-void
+void KRB5_CALLCONV
krb5_vset_error_message (krb5_context ctx, krb5_error_code code,
const char *fmt, va_list args)
{
krb5int_vset_error (&ctx->err, code, fmt, args);
}
-char *
+char * KRB5_CALLCONV
krb5_get_error_message (krb5_context ctx, krb5_error_code code)
{
if (ctx == NULL)
return krb5int_get_error (&ctx->err, code);
}
-void
+void KRB5_CALLCONV
krb5_free_error_message (krb5_context ctx, char *msg)
{
if (ctx == NULL)
krb5int_free_error (&ctx->err, msg);
}
-void
+void KRB5_CALLCONV
krb5_clear_error_message (krb5_context ctx)
{
if (ctx == NULL)