Permalink
Browse files

Activate various debug options, print more debug info.

  • Loading branch information...
1 parent 679f898 commit ee37b5b40693297d5aed85b2a8516d32712fda17 @aadamowski committed Jan 22, 2012
Showing with 11 additions and 6 deletions.
  1. +1 −1 src/lib/krb5/os/Makefile.in
  2. +1 −0 src/lib/krb5/os/locate_kdc.c
  3. +9 −5 src/lib/krb5/os/sendto_kdc.c
@@ -4,7 +4,7 @@ KRB5_RUN_ENV = @KRB5_RUN_ENV@
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
DEFS=
-DEFINES=-DLIBDIR=\"$(KRB5_LIBDIR)\"
+DEFINES=-DLIBDIR=\"$(KRB5_LIBDIR)\" -DDEBUG -DTEST
LOCALINCLUDES=-I$(top_srcdir)/util/profile
##DOS##BUILDTOP = ..\..\..
@@ -109,6 +109,7 @@ k5_free_serverlist (struct serverlist *list)
list->nservers = 0;
}
+#define TEST
#include <stdarg.h>
static inline void
Tprintf(const char *fmt, ...)
@@ -60,10 +60,10 @@
#define DEFAULT_UDP_PREF_LIMIT 1465
#define HARD_UDP_LIMIT 32700 /* could probably do 64K-epsilon ? */
-#undef DEBUG
+/*#undef DEBUG*/
#ifdef DEBUG
-int krb5int_debug_sendto_kdc = 0;
+int krb5int_debug_sendto_kdc = 1;
#define debug krb5int_debug_sendto_kdc
static void
@@ -338,15 +338,19 @@ krb5_sendto_kdc(krb5_context context, const krb5_data *message,
retval = k5_locate_kdc(context, realm, &servers, *use_master,
tcp_only ? SOCK_STREAM : 0);
- if (retval)
+ dprint("k5_locate_kdc retval: [%d]\n", retval);
+
+ if (retval) {
+ dprint("Error [%d], message: [%s]\n", context->err.code, context->err.msg);
return retval;
+ }
#ifdef KRB5_KRBLDAP
- dprint("using krbldap protocol to send kerberos message.");
+ dprint("using krbldap protocol to send kerberos message.\n");
retval = krbldap_sendto(context, message, &servers, socktype1, socktype2,
NULL, reply, NULL, NULL, &server_used,
check_for_svc_unavailable, &err);
#else
- dprint("using kerberos v5 protocol to send kerberos message.");
+ dprint("using kerberos v5 protocol to send kerberos message.\n");
retval = k5_sendto(context, message, &servers, socktype1, socktype2,
NULL, reply, NULL, NULL, &server_used,
check_for_svc_unavailable, &err);

0 comments on commit ee37b5b

Please sign in to comment.