diff options
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/bitmap.c | 15 | ||||
-rw-r--r-- | source/lib/charcnv.c | 2 | ||||
-rw-r--r-- | source/lib/debug.c | 9 | ||||
-rw-r--r-- | source/lib/messages.c | 3 | ||||
-rw-r--r-- | source/lib/msrpc_use.c | 5 | ||||
-rw-r--r-- | source/lib/slprintf.c | 3 | ||||
-rw-r--r-- | source/lib/util.c | 2 |
7 files changed, 24 insertions, 15 deletions
diff --git a/source/lib/bitmap.c b/source/lib/bitmap.c index 1813d63ff77..7625f529095 100644 --- a/source/lib/bitmap.c +++ b/source/lib/bitmap.c @@ -51,6 +51,21 @@ struct bitmap *bitmap_allocate(int n) } /**************************************************************************** +free a bitmap. +****************************************************************************/ + +void bitmap_free(struct bitmap *bm) +{ + if (!bm) + return; + + if(bm->b) + free(bm->b); + + free(bm); +} + +/**************************************************************************** set a bit in a bitmap ****************************************************************************/ BOOL bitmap_set(struct bitmap *bm, unsigned i) diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index 7fedc282ba9..4a3d7090e31 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -19,9 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #include "includes.h" - #define CTRLZ 26 extern int DEBUGLEVEL; diff --git a/source/lib/debug.c b/source/lib/debug.c index 2ba35c00dbb..27fa80ca3f8 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -234,13 +234,13 @@ void debug_message(int msg_type, pid_t src, void *buf, size_t len) /* Set the new DEBUGLEVEL_CLASS array from the pased array */ memcpy(DEBUGLEVEL_CLASS, buf, sizeof(DEBUGLEVEL_CLASS)); - DEBUG(3,("INFO: Debug class %s level = %d (pid %d from pid %d)\n", + DEBUG(1,("INFO: Debug class %s level = %d (pid %d from pid %d)\n", classname_table[DBGC_ALL], DEBUGLEVEL_CLASS[DBGC_ALL], getpid(), (int)src)); for (i=1; i<DBGC_LAST; i++) { if (DEBUGLEVEL_CLASS[i]) - DEBUGADD(3,("INFO: Debug class %s level = %d\n", + DEBUGADD(1,("INFO: Debug class %s level = %d\n", classname_table[i], DEBUGLEVEL_CLASS[i])); } } @@ -263,6 +263,11 @@ void setup_logging(char *pname, BOOL interactive) { message_register(MSG_DEBUG, debug_message); + /* reset to allow multiple setup calls, going from interactive to + non-interactive */ + stdout_logging = False; + dbf = NULL; + if (interactive) { stdout_logging = True; dbf = stdout; diff --git a/source/lib/messages.c b/source/lib/messages.c index 19496bd426b..ab02d1253bf 100644 --- a/source/lib/messages.c +++ b/source/lib/messages.c @@ -78,10 +78,7 @@ return current debug level ****************************************************************************/ void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len) { - int level; - DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %d\n",src)); - level = DEBUGLEVEL; message_send_pid(src, MSG_DEBUGLEVEL, DEBUGLEVEL_CLASS, sizeof(DEBUGLEVEL_CLASS), True); } diff --git a/source/lib/msrpc_use.c b/source/lib/msrpc_use.c index 90fac637b3b..3451b6ec591 100644 --- a/source/lib/msrpc_use.c +++ b/source/lib/msrpc_use.c @@ -1,5 +1,3 @@ -#define OLD_NTDOMAIN 1 - /* Unix SMB/Netbios implementation. Version 1.9. @@ -327,6 +325,3 @@ void msrpc_net_use_enum(uint32 *num_cons, struct use_info ***use) add_use_info_to_array(num_cons, use, &item); } } - - -#undef OLD_NTDOMAIN diff --git a/source/lib/slprintf.c b/source/lib/slprintf.c index ed7113c8652..be81b4aa120 100644 --- a/source/lib/slprintf.c +++ b/source/lib/slprintf.c @@ -78,7 +78,6 @@ va_dcl char *format; #endif va_list ap; - int ret; pstring str; #ifdef HAVE_STDARG_H @@ -90,7 +89,7 @@ va_dcl #endif str[0] = 0; - ret = vslprintf(str,sizeof(str),format,ap); + vslprintf(str,sizeof(str),format,ap); va_end(ap); return write(fd, str, strlen(str)); } diff --git a/source/lib/util.c b/source/lib/util.c index 8ad2cfd713f..3811d81866f 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -359,7 +359,7 @@ void set_message_bcc(char *buf,int num_bytes) ********************************************************************/ void set_message_end(void *outbuf,void *end_ptr) { - set_message_bcc(outbuf,PTR_DIFF(end_ptr,smb_buf(outbuf))); + set_message_bcc((char *)outbuf,PTR_DIFF(end_ptr,smb_buf((char *)outbuf))); } /******************************************************************* |