move deprecated function to deprecated.c
This commit is contained in:
@@ -606,4 +606,40 @@ krb5_auth_getremoteseqnumber(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the error message in context. On error or no error string,
|
||||
* the function returns NULL.
|
||||
*
|
||||
* @param context Kerberos 5 context
|
||||
*
|
||||
* @return an error string, needs to be freed with
|
||||
* krb5_free_error_message(). The functions return NULL on error.
|
||||
*
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
KRB5_LIB_FUNCTION char * KRB5_LIB_CALL
|
||||
krb5_get_error_string(krb5_context context)
|
||||
KRB5_DEPRECATED_FUNCTION("Use krb5_get_error_message instead")
|
||||
{
|
||||
char *ret = NULL;
|
||||
|
||||
HEIMDAL_MUTEX_lock(context->mutex);
|
||||
if (context->error_string)
|
||||
ret = strdup(context->error_string);
|
||||
HEIMDAL_MUTEX_unlock(context->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_have_error_string(krb5_context context)
|
||||
KRB5_DEPRECATED_FUNCTION("Use krb5_get_error_message instead")
|
||||
{
|
||||
char *str;
|
||||
HEIMDAL_MUTEX_lock(context->mutex);
|
||||
str = context->error_string;
|
||||
HEIMDAL_MUTEX_unlock(context->mutex);
|
||||
return str != NULL;
|
||||
}
|
||||
|
||||
#endif /* HEIMDAL_SMALLER */
|
||||
|
Reference in New Issue
Block a user