summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-09-20 20:16:28 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-09-24 17:58:10 +0200
commitc3f27432d012dd72f0282bc2c0962264bafacabd (patch)
tree99f9b2416020f7304e00b04599e8fc2cdaa25585 /src
parentb2f9e5b7d553172401a340eb4a9c3abda6b5db43 (diff)
downloadsssd-c3f27432d012dd72f0282bc2c0962264bafacabd.tar.gz
sssd-c3f27432d012dd72f0282bc2c0962264bafacabd.tar.xz
sssd-c3f27432d012dd72f0282bc2c0962264bafacabd.zip
Make subdomain discovery less noisy
Fixes https://fedorahosted.org/sssd/ticket/1517
Diffstat (limited to 'src')
-rw-r--r--src/providers/data_provider_be.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index dcc40c73d..4e4bdab28 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -402,13 +402,22 @@ static int be_get_subdomains(DBusMessage *message, struct sbus_connection *conn)
return EIO;
}
+ reply = dbus_message_new_method_return(message);
+ if (!reply) return ENOMEM;
+
+ /* return an error if corresponding backend target is not configured */
+ if (becli->bectx->bet_info[BET_SUBDOMAINS].bet_ops == NULL) {
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("Undefined backend target.\n"));
+ err_maj = DP_ERR_FATAL;
+ err_min = ENODEV;
+ err_msg = "Subdomains back end target is not configured";
+ goto immediate;
+ }
+
DEBUG(SSSDBG_TRACE_FUNC,
("Got get subdomains [%sforced][%s]\n", force ? "" : "not ",
domain_hint == NULL ? "no hint": domain_hint ));
- reply = dbus_message_new_method_return(message);
- if (!reply) return ENOMEM;
-
/* If we are offline return immediately
*/
if (becli->bectx->offstat.offline) {
@@ -450,16 +459,6 @@ static int be_get_subdomains(DBusMessage *message, struct sbus_connection *conn)
be_req->req_data = req;
- /* return an error if corresponding backend target is not configured */
- if (becli->bectx->bet_info[BET_SUBDOMAINS].bet_ops == NULL) {
- DEBUG(SSSDBG_CONF_SETTINGS, ("Undefined backend target.\n"));
- err_maj = DP_ERR_FATAL;
- err_min = ENODEV;
- err_msg = "Subdomains back end target is not configured";
- goto immediate;
- }
-
-
ret = be_file_request(becli->bectx,
be_req,
becli->bectx->bet_info[BET_SUBDOMAINS].bet_ops->handler);
@@ -489,8 +488,10 @@ immediate:
return EIO;
}
- DEBUG(SSSDBG_TRACE_LIBS, ("Request processed. Returned %d,%d,%s\n",
- err_maj, err_min, err_msg));
+ if (!(err_maj == DP_ERR_FATAL && err_min == ENODEV)) {
+ DEBUG(SSSDBG_TRACE_LIBS, ("Request processed. Returned %d,%d,%s\n",
+ err_maj, err_min, err_msg));
+ }
/* send reply back */
sbus_conn_send_reply(conn, reply);