From 0fcdef99980260d2da308c2c26861492ab983e3d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 5 Mar 2013 00:15:35 +0100 Subject: Return error code from ipa_subdom_store --- src/providers/ipa/ipa_subdomains.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c index 7d6e5958e..529618bca 100644 --- a/src/providers/ipa/ipa_subdomains.c +++ b/src/providers/ipa/ipa_subdomains.c @@ -230,11 +230,13 @@ static errno_t ipa_subdom_store(struct sss_domain_info *domain, ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, id); if (ret) { DEBUG(SSSDBG_OP_FAILURE, ("sysdb_subdomain_store failed.\n")); + goto done; } + ret = EOK; done: talloc_free(tmp_ctx); - return EOK; + return ret; } static errno_t @@ -431,8 +433,11 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx, /* ok let's try to update it */ ret = ipa_subdom_store(domain, reply[c]); if (ret) { - DEBUG(SSSDBG_OP_FAILURE, ("Failed to parse subdom data\n")); - goto done; + /* Nothing we can do about the errorr. Let's at least try + * to reuse the existing domain + */ + DEBUG(SSSDBG_MINOR_FAILURE, ("Failed to parse subdom data, " + "will try to use cached subdomain\n")); } handled[c] = true; h++; @@ -452,10 +457,13 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx, if (handled[c]) { continue; } + /* Nothing we can do about the errorr. Let's at least try + * to reuse the existing domain. + */ ret = ipa_subdom_store(domain, reply[c]); if (ret) { - DEBUG(SSSDBG_OP_FAILURE, ("Failed to parse subdom data\n")); - goto done; + DEBUG(SSSDBG_MINOR_FAILURE, ("Failed to parse subdom data, " + "will try to use cached subdomain\n")); } } -- cgit