summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sledz <dsledz@isilon.com>2008-12-15 17:12:49 -0800
committerTim Prouty <tprouty@samba.org>2008-12-15 23:30:50 -0800
commit2f17be1f57b895b0e37e0a3d77d2ffea4d34d340 (patch)
tree2fbe5ab480f28d41dcf19cf54da37e9de721b8e3
parent70874ceed92c60a2c016ea05507b0fa273f1d853 (diff)
downloadsamba-2f17be1f57b895b0e37e0a3d77d2ffea4d34d340.tar.gz
samba-2f17be1f57b895b0e37e0a3d77d2ffea4d34d340.tar.bz2
samba-2f17be1f57b895b0e37e0a3d77d2ffea4d34d340.zip
s3: Use DEBUGADD instead of DEBUG to avoid printing the header
-rw-r--r--source3/lib/util_sock.c5
-rw-r--r--source3/rpc_parse/parse_prs.c52
2 files changed, 29 insertions, 28 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 605bbf1fb6..7fe8ed82a2 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -368,13 +368,14 @@ static void print_socket_options(int s)
* leak in SCO Openserver 5.0 */
/* reported on samba-technical --jerry */
if ( DEBUGLEVEL >= 5 ) {
+ DEBUG(5,("Socket options:\n"));
for (; p->name != NULL; p++) {
if (getsockopt(s, p->level, p->option,
(void *)&value, &vlen) == -1) {
- DEBUG(5,("Could not test socket option %s.\n",
+ DEBUGADD(5,("\tCould not test socket option %s.\n",
p->name));
} else {
- DEBUG(5,("socket option %s = %d\n",
+ DEBUGADD(5,("\t%s = %d\n",
p->name,value));
}
}
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index acc0cc88ef..d549265fa1 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -629,7 +629,7 @@ bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8)
else
SCVAL(q,0,*data8);
- DEBUG(5,("%s%04x %s: %02x\n", tab_depth(5,depth), ps->data_offset, name, *data8));
+ DEBUGADD(5,("%s%04x %s: %02x\n", tab_depth(5,depth), ps->data_offset, name, *data8));
ps->data_offset += 1;
@@ -694,7 +694,7 @@ bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16)
SSVAL(q,0,*data16);
}
- DEBUG(5,("%s%04x %s: %04x\n", tab_depth(5,depth), ps->data_offset, name, *data16));
+ DEBUGADD(5,("%s%04x %s: %04x\n", tab_depth(5,depth), ps->data_offset, name, *data16));
ps->data_offset += sizeof(uint16);
@@ -723,7 +723,7 @@ bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32)
SIVAL(q,0,*data32);
}
- DEBUG(5,("%s%04x %s: %08x\n", tab_depth(5,depth), ps->data_offset, name, *data32));
+ DEBUGADD(5,("%s%04x %s: %08x\n", tab_depth(5,depth), ps->data_offset, name, *data32));
ps->data_offset += sizeof(uint32);
@@ -752,7 +752,7 @@ bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32)
SIVALS(q,0,*data32);
}
- DEBUG(5,("%s%04x %s: %08x\n", tab_depth(5,depth), ps->data_offset, name, *data32));
+ DEBUGADD(5,("%s%04x %s: %08x\n", tab_depth(5,depth), ps->data_offset, name, *data32));
ps->data_offset += sizeof(int32);
@@ -781,7 +781,7 @@ bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status)
SIVAL(q,0,NT_STATUS_V(*status));
}
- DEBUG(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name,
+ DEBUGADD(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name,
nt_errstr(*status)));
ps->data_offset += sizeof(uint32);
@@ -811,7 +811,7 @@ bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *st
SIVAL(q,0,NT_STATUS_V(*status));
}
- DEBUG(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name,
+ DEBUGADD(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name,
dcerpc_errstr(debug_ctx(), NT_STATUS_V(*status))));
ps->data_offset += sizeof(uint32);
@@ -842,7 +842,7 @@ bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status)
SIVAL(q,0,W_ERROR_V(*status));
}
- DEBUG(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name,
+ DEBUGADD(5,("%s%04x %s: %s\n", tab_depth(5,depth), ps->data_offset, name,
win_errstr(*status)));
ps->data_offset += sizeof(uint32);
@@ -870,14 +870,14 @@ bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint
SCVAL(q, i, data8s[i]);
}
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset ,name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset ,name));
if (charmode)
print_asc(5, (unsigned char*)data8s, len);
else {
for (i = 0; i < len; i++)
- DEBUG(5,("%02x ", data8s[i]));
+ DEBUGADD(5,("%02x ", data8s[i]));
}
- DEBUG(5,("\n"));
+ DEBUGADD(5,("\n"));
ps->data_offset += len;
@@ -913,14 +913,14 @@ bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uin
}
}
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
if (charmode)
print_asc(5, (unsigned char*)data16s, 2*len);
else {
for (i = 0; i < len; i++)
- DEBUG(5,("%04x ", data16s[i]));
+ DEBUGADD(5,("%04x ", data16s[i]));
}
- DEBUG(5,("\n"));
+ DEBUGADD(5,("\n"));
ps->data_offset += (len * sizeof(uint16));
@@ -955,14 +955,14 @@ static void dbg_rw_punival(bool charmode, const char *name, int depth, prs_struc
}
}
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
if (charmode)
print_asc(5, (unsigned char*)out_buf, 2*len);
else {
for (i = 0; i < len; i++)
- DEBUG(5,("%04x ", out_buf[i]));
+ DEBUGADD(5,("%04x ", out_buf[i]));
}
- DEBUG(5,("\n"));
+ DEBUGADD(5,("\n"));
}
/******************************************************************
@@ -1010,14 +1010,14 @@ bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uin
}
}
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
if (charmode)
print_asc(5, (unsigned char*)data32s, 4*len);
else {
for (i = 0; i < len; i++)
- DEBUG(5,("%08x ", data32s[i]));
+ DEBUGADD(5,("%08x ", data32s[i]));
}
- DEBUG(5,("\n"));
+ DEBUGADD(5,("\n"));
ps->data_offset += (len * sizeof(uint32));
@@ -1078,7 +1078,7 @@ bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STR
} else {
str->buffer = NULL;
/* Return early to ensure Coverity isn't confused. */
- DEBUG(5,("%s%04x %s: \n", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: \n", tab_depth(5,depth), ps->data_offset, name));
return True;
}
}
@@ -1091,14 +1091,14 @@ bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STR
SCVAL(q, i, str->buffer[i]);
}
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
if (charmode)
print_asc(5, (unsigned char*)str->buffer, str->str_str_len);
else {
for (i = 0; i < str->str_str_len; i++)
DEBUG(5,("%02x ", str->buffer[i]));
}
- DEBUG(5,("\n"));
+ DEBUGADD(5,("\n"));
ps->data_offset += str->str_str_len;
@@ -1227,9 +1227,9 @@ bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str)
len++;
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
print_asc(5, (unsigned char*)start, 2*len);
- DEBUG(5, ("\n"));
+ DEBUGADD(5, ("\n"));
}
else { /* unmarshalling */
@@ -1284,9 +1284,9 @@ bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str)
str->buffer[len++] = '\0';
}
- DEBUG(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
+ DEBUGADD(5,("%s%04x %s: ", tab_depth(5,depth), ps->data_offset, name));
print_asc(5, (unsigned char*)str->buffer, 2*len);
- DEBUG(5, ("\n"));
+ DEBUGADD(5, ("\n"));
}
/* set the offset in the prs_struct; 'len' points to the