summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-10-07 10:01:38 -0400
committerSimo Sorce <idra@samba.org>2008-10-07 10:01:38 -0400
commitd452cc572ba13d01c8a96f311a1db5f99e25caf7 (patch)
tree8f7403a70d11156a25624997e46d8a11040f1228
parent82cbd7901b0bc12ecfc1d247e7e1ecaa3bda2368 (diff)
downloadsssd-d452cc572ba13d01c8a96f311a1db5f99e25caf7.tar.gz
sssd-d452cc572ba13d01c8a96f311a1db5f99e25caf7.tar.bz2
sssd-d452cc572ba13d01c8a96f311a1db5f99e25caf7.zip
Forgot to add debug.c
-rw-r--r--server/util/debug.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/util/debug.c b/server/util/debug.c
new file mode 100644
index 00000000..0814bb7b
--- /dev/null
+++ b/server/util/debug.c
@@ -0,0 +1,20 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+int debug_level = 2;
+
+void debug_fn(const char *format, ...)
+{
+ va_list ap;
+ char *s = NULL;
+
+ va_start(ap, format);
+ vasprintf(&s, format, ap);
+ va_end(ap);
+
+ /*write(state.fd, s, strlen(s));*/
+ fprintf(stderr, s);
+ free(s);
+}