mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
debug: Add a level of indirection to ring buffer logging
Add an internal function to do the work and call it. It will be called again in a subsequent commit. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
fb29a8ebcd
commit
0e59375ac5
@ -368,9 +368,8 @@ static void debug_ringbuf_reload(bool enabled, bool previously_enabled,
|
||||
}
|
||||
}
|
||||
|
||||
static void debug_ringbuf_log(int msg_level,
|
||||
const char *msg,
|
||||
const char *msg_no_nl)
|
||||
static void _debug_ringbuf_log(int msg_level,
|
||||
const char *msg)
|
||||
{
|
||||
size_t msglen = strlen(msg);
|
||||
size_t allowed_size;
|
||||
@ -398,6 +397,13 @@ static void debug_ringbuf_log(int msg_level,
|
||||
debug_ringbuf_ofs += msglen;
|
||||
}
|
||||
|
||||
static void debug_ringbuf_log(int msg_level,
|
||||
const char *msg,
|
||||
const char *msg_no_nl)
|
||||
{
|
||||
_debug_ringbuf_log(msg_level, msg);
|
||||
}
|
||||
|
||||
static struct debug_backend {
|
||||
const char *name;
|
||||
int log_level;
|
||||
|
Loading…
x
Reference in New Issue
Block a user