Blob Blame History Raw
From 9899507b2da55a374baef13c4dc3914fe853cf87 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Mon, 25 Jul 2016 17:37:51 +0200
Subject: [PATCH 42/44] sysdb_master_domain_add_info: properly set do_update
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

do_update should be only set if there is a change, i.e if something was
added to the ldb_message.

Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
---
 src/db/sysdb_subdomains.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c
index 02206e470e8e035cc05848137df6a1eb04806869..ff83f914f31d566e050c74a3ef5f5745f8c93add 100644
--- a/src/db/sysdb_subdomains.c
+++ b/src/db/sysdb_subdomains.c
@@ -787,9 +787,9 @@ errno_t sysdb_master_domain_add_info(struct sss_domain_info *domain,
                 ret = sysdb_error_to_errno(ret);
                 goto done;
             }
-        }
 
-        do_update = true;
+            do_update = true;
+        }
     }
 
     if (do_update == false) {
-- 
2.4.11