Replace krb5_get_err_text with new function com_right.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2127 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -4,29 +4,15 @@ RCSID("$Id$");
|
|||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <krb5.h>
|
#include <error.h>
|
||||||
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
krb5_get_err_text(krb5_context context, long code)
|
com_right(struct error_table *list, long code)
|
||||||
{
|
{
|
||||||
struct error_table *p;
|
struct error_table *p;
|
||||||
for(p = context->et_list; p; p = p->next){
|
for(p = list; p; p = p->next){
|
||||||
if(code >= p->base && code < p->base + p->n_msgs)
|
if(code >= p->base && code < p->base + p->n_msgs)
|
||||||
return p->msgs[code - p->base];
|
return p->msgs[code - p->base];
|
||||||
}
|
}
|
||||||
return strerror(code);
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
krb5_init_ets(krb5_context context)
|
|
||||||
{
|
|
||||||
if(context->et_list == NULL){
|
|
||||||
initialize_krb5_error_table(&context->et_list);
|
|
||||||
#if 0
|
|
||||||
initialize_kv5m_error_table(&context->et_list);
|
|
||||||
initialize_kdb5_error_table(&context->et_list);
|
|
||||||
#endif
|
|
||||||
initialize_asn1_error_table(&context->et_list);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -4,29 +4,15 @@ RCSID("$Id$");
|
|||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <krb5.h>
|
#include <error.h>
|
||||||
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
krb5_get_err_text(krb5_context context, long code)
|
com_right(struct error_table *list, long code)
|
||||||
{
|
{
|
||||||
struct error_table *p;
|
struct error_table *p;
|
||||||
for(p = context->et_list; p; p = p->next){
|
for(p = list; p; p = p->next){
|
||||||
if(code >= p->base && code < p->base + p->n_msgs)
|
if(code >= p->base && code < p->base + p->n_msgs)
|
||||||
return p->msgs[code - p->base];
|
return p->msgs[code - p->base];
|
||||||
}
|
}
|
||||||
return strerror(code);
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
krb5_init_ets(krb5_context context)
|
|
||||||
{
|
|
||||||
if(context->et_list == NULL){
|
|
||||||
initialize_krb5_error_table(&context->et_list);
|
|
||||||
#if 0
|
|
||||||
initialize_kv5m_error_table(&context->et_list);
|
|
||||||
initialize_kdb5_error_table(&context->et_list);
|
|
||||||
#endif
|
|
||||||
initialize_asn1_error_table(&context->et_list);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user