diff options
author | Simo Sorce <idra@samba.org> | 2008-10-07 10:01:38 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-10-07 10:01:38 -0400 |
commit | d452cc572ba13d01c8a96f311a1db5f99e25caf7 (patch) | |
tree | 8f7403a70d11156a25624997e46d8a11040f1228 | |
parent | 82cbd7901b0bc12ecfc1d247e7e1ecaa3bda2368 (diff) | |
download | sssd-d452cc572ba13d01c8a96f311a1db5f99e25caf7.tar.gz sssd-d452cc572ba13d01c8a96f311a1db5f99e25caf7.tar.bz2 sssd-d452cc572ba13d01c8a96f311a1db5f99e25caf7.zip |
Forgot to add debug.c
-rw-r--r-- | server/util/debug.c | 20 |
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); +} |