summaryrefslogtreecommitdiffstats
path: root/lasso/debug.h
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-10-01 10:31:58 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-10-01 10:31:58 +0000
commitef42f2cbc8eb16df1a8e45650c652d227fd35ef4 (patch)
tree35b69e41a882c19f11b61ecfe2f7d0d4ff718faf /lasso/debug.h
parent7290225b00d65a7ea111ddf3216bf7d9f39a81b6 (diff)
downloadlasso-ef42f2cbc8eb16df1a8e45650c652d227fd35ef4.tar.gz
lasso-ef42f2cbc8eb16df1a8e45650c652d227fd35ef4.tar.xz
lasso-ef42f2cbc8eb16df1a8e45650c652d227fd35ef4.zip
add functionality to enable debugging flags at runtime
This code permit to set flags, separated by commas, space, tabulations, or colons. This flags activates debug functions like, suppressing validations of signatures or print debugging message about deallocations. The new flags are defined in /lasso/debug.h they can be set using an environment variable named LASSO_FLAG or a function named lasso_set_flag. There are two flags currently: - verify-signature: To deactivate it, pass 'no-verify-signature' inside LASSO_DEBUG. It desactivate signature verification, inside two functions: lasso_query_verify_signature and lasso_provider_verify_signature. - memory-debug: It enabled reporting of memory deallocation inside generic memory dellaocator for LassoNode objects and also in bindings. - lasso/xml/xml.c: do not free a null hash table pointer.
Diffstat (limited to 'lasso/debug.h')
-rw-r--r--lasso/debug.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/lasso/debug.h b/lasso/debug.h
new file mode 100644
index 00000000..00955873
--- /dev/null
+++ b/lasso/debug.h
@@ -0,0 +1,41 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004-2007 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: See AUTHORS file in top-level directory.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __LASSO_DEBUG_H__
+#define __LASSO__DEBUGH__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <glib.h>
+
+LASSO_EXPORT extern gboolean lasso_flag_verify_signature;
+LASSO_EXPORT extern gboolean lasso_flag_memory_debug;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_DEBUG_H__ */