Hello,

Improve logging for cases where SOA serial autoincrementation failed.

--
Petr^2 Spacek
From 9ef4eee3c484557efd7c777458c6800f7c61bdaf Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Mon, 8 Jul 2013 13:15:56 +0200
Subject: [PATCH] Improve logging for cases where SOA serial autoincrementation
 failed.

Signed-off-by: Petr Spacek <pspa...@redhat.com>
---
 src/ldap_helper.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 514b81e8da1539e9402cef8a07f8feafeb13ff4d..05aa1a1d4b5091816af092895e881c0e2b1ff0eb 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -3709,10 +3709,12 @@ soa_serial_increment(isc_mem_t *mctx, ldap_instance_t *inst,
 	CHECK(ldap_get_zone_serial(inst, zone_name, &new_serial));
 
 cleanup:
-	if (result != ISC_R_SUCCESS ||
-	    isc_serial_gt(new_serial, old_serial) != ISC_TRUE)
-		log_error("SOA serial number incrementation failed in zone '%s'",
-				zone_dn_char);
+	if (result == ISC_R_SUCCESS &&
+	    isc_serial_gt(new_serial, old_serial) == ISC_FALSE)
+		result = DNS_R_UNCHANGED;
+	if (result != ISC_R_SUCCESS)
+		log_error_r("SOA serial number incrementation failed in zone "
+			    "'%s'", zone_dn_char);
 
 	str_destroy(&zone_dn);
 	ldapdb_rdatalist_destroy(mctx, &rdatalist);
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to