summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/bitmap.c15
-rw-r--r--source3/lib/charcnv.c2
-rw-r--r--source3/lib/debug.c9
-rw-r--r--source3/lib/messages.c3
-rw-r--r--source3/lib/msrpc_use.c5
-rw-r--r--source3/lib/slprintf.c3
-rw-r--r--source3/lib/util.c2
7 files changed, 24 insertions, 15 deletions
diff --git a/source3/lib/bitmap.c b/source3/lib/bitmap.c
index 1813d63ff7..7625f52909 100644
--- a/source3/lib/bitmap.c
+++ b/source3/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/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 7fedc282ba..4a3d7090e3 100644
--- a/source3/lib/charcnv.c
+++ b/source3/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/source3/lib/debug.c b/source3/lib/debug.c
index 2ba35c00db..27fa80ca3f 100644
--- a/source3/lib/debug.c
+++ b/source3/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/source3/lib/messages.c b/source3/lib/messages.c
index 19496bd426..ab02d1253b 100644
--- a/source3/lib/messages.c
+++ b/source3/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/source3/lib/msrpc_use.c b/source3/lib/msrpc_use.c
index 90fac637b3..3451b6ec59 100644
--- a/source3/lib/msrpc_use.c
+++ b/source3/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/source3/lib/slprintf.c b/source3/lib/slprintf.c
index ed7113c865..be81b4aa12 100644
--- a/source3/lib/slprintf.c
+++ b/source3/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/source3/lib/util.c b/source3/lib/util.c
index 8ad2cfd713..3811d81866 100644
--- a/source3/lib/util.c
+++ b/source3/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)));
}
/*******************************************************************