X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fprint.c;h=c83eac733091e5aaa1aaaff6ba3cbdf9d62b41b5;hb=b905811d3c800b6f4031d541e424e5de871aa0c7;hp=a6616c53ecad68ce0b66fe8a60b5e5a04ea24c8d;hpb=403f4479bc9f9a864122d4aeecf7284408918302;p=openldap diff --git a/libraries/libldap/print.c b/libraries/libldap/print.c index a6616c53ec..c83eac7330 100644 --- a/libraries/libldap/print.c +++ b/libraries/libldap/print.c @@ -1,7 +1,16 @@ /* $OpenLDAP$ */ -/* - * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2011 The OpenLDAP Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . */ #include "portable.h" @@ -26,7 +35,7 @@ static int ldap_log_check( LDAP *ld, int loglvl ) if(ld == NULL) { errlvl = ldap_debug; } else { - errlvl = ld->ld_errno; + errlvl = ld->ld_debug; } return errlvl & loglvl ? 1 : 0; @@ -43,15 +52,8 @@ int ldap_log_printf( LDAP *ld, int loglvl, const char *fmt, ... ) va_start( ap, fmt ); -#ifdef HAVE_VSNPRINTF buf[sizeof(buf) - 1] = '\0'; vsnprintf( buf, sizeof(buf)-1, fmt, ap ); -#elif HAVE_VSPRINTF - vsprintf( buf, fmt, ap ); /* hope it's not too long */ -#else - /* use doprnt() */ - chokeme = "choke me! I don't have a doprnt manual handy!"; -#endif va_end(ap);