diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-02-12 10:12:59 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-02 10:58:33 +0200 |
commit | 46c28ba3044c2121c2c0af4493ac655dcb41e0e6 (patch) | |
tree | 376633177afd84f0b46a8e2e5533f5337a38cf95 /src/responder/common/responder_dp.c | |
parent | dad68b3284228a38b4beb06946701e8795980966 (diff) | |
download | sssd-46c28ba3044c2121c2c0af4493ac655dcb41e0e6.tar.gz sssd-46c28ba3044c2121c2c0af4493ac655dcb41e0e6.tar.xz sssd-46c28ba3044c2121c2c0af4493ac655dcb41e0e6.zip |
Update DEBUG* invocations to use new levels
Use a script (identical to commit
83bf46f4066e3d5e838a32357c201de9bd6ecdfd) to update DEBUG* macro
invocations, which use literal numbers for levels, to use bitmask macros
instead:
grep -rl --include '*.[hc]' DEBUG . |
while read f; do
mv "$f"{,.orig}
perl -e 'use strict;
use File::Slurp;
my @map=qw"
SSSDBG_FATAL_FAILURE
SSSDBG_CRIT_FAILURE
SSSDBG_OP_FAILURE
SSSDBG_MINOR_FAILURE
SSSDBG_CONF_SETTINGS
SSSDBG_FUNC_DATA
SSSDBG_TRACE_FUNC
SSSDBG_TRACE_LIBS
SSSDBG_TRACE_INTERNAL
SSSDBG_TRACE_ALL
";
my $text=read_file(\*STDIN);
my $repl;
$text=~s/
^
(
.*
\b
(DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM)
\s*
\(\s*
)(
[0-9]
)(
\s*,
)
(
\s*
)
(
.*
)
$
/
$repl = $1.$map[$3].$4.$5.$6,
length($repl) <= 80
? $repl
: $1.$map[$3].$4."\n".(" " x length($1)).$6
/xmge;
print $text;
' < "$f.orig" > "$f"
rm "$f.orig"
done
Diffstat (limited to 'src/responder/common/responder_dp.c')
-rw-r--r-- | src/responder/common/responder_dp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c index 396c80997..a9b4ae23a 100644 --- a/src/responder/common/responder_dp.c +++ b/src/responder/common/responder_dp.c @@ -142,18 +142,19 @@ void handle_requests_after_reconnect(struct resp_ctx *rctx) struct sss_dp_req *sdp_req; if (!rctx->dp_request_table) { - DEBUG(7, "No requests to handle after reconnect\n"); + DEBUG(SSSDBG_TRACE_LIBS, "No requests to handle after reconnect\n"); return; } ret = hash_values(rctx->dp_request_table, &count, &values); if (ret != HASH_SUCCESS) { - DEBUG(1, "hash_values failed, " + DEBUG(SSSDBG_CRIT_FAILURE, "hash_values failed, " "not all request might be handled after reconnect.\n"); return; } - DEBUG(7, "Will handle %lu requests after reconnect\n", count); + DEBUG(SSSDBG_TRACE_LIBS, + "Will handle %lu requests after reconnect\n", count); for (i=0; i<count; i++) { sdp_req = talloc_get_type(values[i].ptr, struct sss_dp_req); talloc_free(sdp_req); @@ -197,7 +198,7 @@ static int sss_dp_get_reply(DBusPendingCall *pending, DBUS_TYPE_STRING, err_msg, DBUS_TYPE_INVALID); if (!ret) { - DEBUG(1,"Failed to parse message\n"); + DEBUG(SSSDBG_CRIT_FAILURE,"Failed to parse message\n"); /* FIXME: Destroy this connection ? */ if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error); err = EIO; @@ -216,7 +217,7 @@ static int sss_dp_get_reply(DBusPendingCall *pending, err = ETIME; goto done; } - DEBUG(0,"The Data Provider returned an error [%s]\n", + DEBUG(SSSDBG_FATAL_FAILURE,"The Data Provider returned an error [%s]\n", dbus_message_get_error_name(reply)); /* Falling through to default intentionally*/ default: |