From bbb5f66bcd4f096f7b1281e4fda6fdb488f064bc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 1 Nov 2013 11:55:43 +0000 Subject: [PATCH] smbd: Fix DEBUG in do_break_to_none The name of this function has changed, but the DEBUG statements have not been adapted. This is the case in a lot of our code. With __func__ this problem goes away: __func__ is C99, and we also use it already. Signed-off-by: Volker Lendecke Reviewed-by: Michael Adam --- source3/smbd/oplock.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index b5d6b54b148..312855d22a5 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -644,13 +644,12 @@ static void do_break_to_none(struct tevent_context *ctx, lck = get_existing_share_mode_lock(talloc_tos(), state->id); if (lck == NULL) { - DEBUG(1, ("release_level_2_oplocks_on_change: failed to lock " - "share mode entry for file %s.\n", - file_id_string_tos(&state->id))); + DEBUG(1, ("%s: failed to lock share mode entry for file %s.\n", + __func__, file_id_string_tos(&state->id))); goto done; } - DEBUG(10,("release_level_2_oplocks_on_change: num_share_modes = %d\n", + DEBUG(10,("%s: num_share_modes = %d\n", __func__, lck->data->num_share_modes )); for(i = 0; i < lck->data->num_share_modes; i++) { @@ -672,8 +671,7 @@ static void do_break_to_none(struct tevent_context *ctx, * NO_OPLOCK states. JRA. */ - DEBUG(10,("release_level_2_oplocks_on_change: " - "share_entry[%i]->op_type == %d\n", + DEBUG(10,("%s: share_entry[%i]->op_type == %d\n", __func__, i, share_entry->op_type )); if (share_entry->op_type == NO_OPLOCK) { @@ -682,9 +680,9 @@ static void do_break_to_none(struct tevent_context *ctx, /* Paranoia .... */ if (EXCLUSIVE_OPLOCK_TYPE(share_entry->op_type)) { - DEBUG(0,("release_level_2_oplocks_on_change: PANIC. " + DEBUG(0,("%s: PANIC. " "share mode entry %d is an exlusive " - "oplock !\n", i )); + "oplock !\n", __func__, i )); TALLOC_FREE(lck); abort(); }