dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From 9941803301b127d9326283b7eee9ad29f462574f Mon Sep 17 00:00:00 2001
From: Pavel Reichl <preichl@redhat.com>
Date: Thu, 23 Jul 2015 09:52:47 -0400
Subject: [PATCH 88/90] DYNDNS: rename field of sdap_dyndns_update_state

Rename 'use_server_with_nsupdate' to more general name 'fallback_mode'.

Resolves:
https://fedorahosted.org/sssd/ticket/2495

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 76604931b11594394a05df10f8370a1b8bb3e54b)
---
 src/providers/ldap/sdap_dyndns.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/providers/ldap/sdap_dyndns.c b/src/providers/ldap/sdap_dyndns.c
index f0e3dd855005d00ea19cb5dc283375f58b0d2cca..2a179fd1b5e88bdf2442657ff6fa1dcc55417467 100644
--- a/src/providers/ldap/sdap_dyndns.c
+++ b/src/providers/ldap/sdap_dyndns.c
@@ -58,7 +58,7 @@ struct sdap_dyndns_update_state {
     bool update_ptr;
     bool check_diff;
     enum be_nsupdate_auth auth_type;
-    bool use_server_with_nsupdate;
+    bool fallback_mode;
     char *update_msg;
 };
 
@@ -100,7 +100,7 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx,
     state->hostname = hostname;
     state->realm = realm;
     state->servername = servername;
-    state->use_server_with_nsupdate = false;
+    state->fallback_mode = false;
     state->ttl = ttl;
     state->be_res = be_ctx->be_res;
     state->ev = ev;
@@ -316,7 +316,7 @@ sdap_dyndns_update_step(struct tevent_req *req)
     state = tevent_req_data(req, struct sdap_dyndns_update_state);
 
     servername = NULL;
-    if (state->use_server_with_nsupdate == true &&
+    if (state->fallback_mode == true &&
         state->servername) {
         servername = state->servername;
     }
@@ -359,9 +359,9 @@ sdap_dyndns_update_done(struct tevent_req *subreq)
     talloc_zfree(subreq);
     if (ret != EOK) {
         /* If the update didn't succeed, we can retry using the server name */
-        if (state->use_server_with_nsupdate == false && state->servername &&
+        if (state->fallback_mode == false && state->servername &&
             WIFEXITED(child_status) && WEXITSTATUS(child_status) != 0) {
-            state->use_server_with_nsupdate = true;
+            state->fallback_mode = true;
             DEBUG(SSSDBG_MINOR_FAILURE,
                    "nsupdate failed, retrying with server name\n");
             ret = sdap_dyndns_update_step(req);
@@ -400,7 +400,7 @@ sdap_dyndns_update_ptr_step(struct tevent_req *req)
     state = tevent_req_data(req, struct sdap_dyndns_update_state);
 
     servername = NULL;
-    if (state->use_server_with_nsupdate == true &&
+    if (state->fallback_mode == true &&
         state->servername) {
         servername = state->servername;
     }
@@ -443,9 +443,9 @@ sdap_dyndns_update_ptr_done(struct tevent_req *subreq)
     talloc_zfree(subreq);
     if (ret != EOK) {
         /* If the update didn't succeed, we can retry using the server name */
-        if (state->use_server_with_nsupdate == false && state->servername &&
+        if (state->fallback_mode == false && state->servername &&
             WIFEXITED(child_status) && WEXITSTATUS(child_status) != 0) {
-            state->use_server_with_nsupdate = true;
+            state->fallback_mode = true;
             DEBUG(SSSDBG_MINOR_FAILURE,
                    "nsupdate failed, retrying with server name\n");
             ret = sdap_dyndns_update_ptr_step(req);
-- 
2.4.3