From 7d8631bd213419c50f1228987413ac94c5b05667 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Sat, 16 Jul 2011 17:46:48 +0200
Subject: [PATCH 1/2] Rename fo_get_server_name to fo_get_server_str_name

---
 src/providers/data_provider_fo.c |    6 +++---
 src/providers/fail_over.c        |    2 +-
 src/providers/fail_over.h        |    2 +-
 src/providers/ipa/ipa_common.c   |    4 ++--
 src/providers/krb5/krb5_common.c |    2 +-
 src/providers/ldap/ldap_common.c |    4 ++--
 src/tests/fail_over-tests.c      |    2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index d4e0498..6f9c757 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -406,7 +406,7 @@ static void be_resolve_server_done(struct tevent_req *subreq)
             return;
         }
         DEBUG(6, ("Couldn't resolve server (%s), resolver returned (%d)\n",
-                  fo_get_server_name(state->srv), ret));
+                  fo_get_server_str_name(state->srv), ret));
 
         state->attempts++;
         if (state->attempts >= 10) {
@@ -438,7 +438,7 @@ static void be_resolve_server_done(struct tevent_req *subreq)
         srvaddr = fo_get_server_hostent(state->srv);
         if (!srvaddr) {
             DEBUG(3, ("FATAL: No hostent available for server (%s)\n",
-                      fo_get_server_name(state->srv)));
+                      fo_get_server_str_name(state->srv)));
             tevent_req_error(req, EFAULT);
             return;
         }
@@ -447,7 +447,7 @@ static void be_resolve_server_done(struct tevent_req *subreq)
                   ipaddr, 128);
 
         DEBUG(4, ("Found address for server %s: [%s] TTL %d\n",
-                  fo_get_server_name(state->srv), ipaddr,
+                  fo_get_server_str_name(state->srv), ipaddr,
                   srvaddr->addr_list[0]->ttl));
     }
 
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index c182d80..2bf6984 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -1375,7 +1375,7 @@ fo_get_server_port(struct fo_server *server)
     return server->port;
 }
 
-const char *fo_get_server_name(struct fo_server *server)
+const char *fo_get_server_str_name(struct fo_server *server)
 {
     if (!server->common) {
         if (fo_is_srv_lookup(server)) {
diff --git a/src/providers/fail_over.h b/src/providers/fail_over.h
index e5d6c52..cb9e54e 100644
--- a/src/providers/fail_over.h
+++ b/src/providers/fail_over.h
@@ -167,7 +167,7 @@ void *fo_get_server_user_data(struct fo_server *server);
 
 int fo_get_server_port(struct fo_server *server);
 
-const char *fo_get_server_name(struct fo_server *server);
+const char *fo_get_server_str_name(struct fo_server *server);
 
 struct resolv_hostent *fo_get_server_hostent(struct fo_server *server);
 
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 0adfd94..70272a2 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -620,7 +620,7 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server)
     srvaddr = fo_get_server_hostent(server);
     if (!srvaddr) {
         DEBUG(1, ("FATAL: No hostent available for server (%s)\n",
-                  fo_get_server_name(server)));
+                  fo_get_server_str_name(server)));
         talloc_free(tmp_ctx);
         return;
     }
@@ -639,7 +639,7 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server)
         return;
     }
 
-    new_uri = talloc_asprintf(service, "ldap://%s", fo_get_server_name(server));
+    new_uri = talloc_asprintf(service, "ldap://%s", fo_get_server_str_name(server));
     if (!new_uri) {
         DEBUG(2, ("Failed to copy URI ...\n"));
         talloc_free(tmp_ctx);
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c
index d8e4a7b..4e79286 100644
--- a/src/providers/krb5/krb5_common.c
+++ b/src/providers/krb5/krb5_common.c
@@ -399,7 +399,7 @@ static void krb5_resolve_callback(void *private_data, struct fo_server *server)
     srvaddr = fo_get_server_hostent(server);
     if (!srvaddr) {
         DEBUG(1, ("FATAL: No hostent available for server (%s)\n",
-                  fo_get_server_name(server)));
+                  fo_get_server_str_name(server)));
         talloc_free(tmp_ctx);
         return;
     }
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index f2729f3..656c102 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -561,7 +561,7 @@ static void sdap_uri_callback(void *private_data, struct fo_server *server)
     srvaddr = fo_get_server_hostent(server);
     if (!srvaddr) {
         DEBUG(1, ("FATAL: No hostent available for server (%s)\n",
-                  fo_get_server_name(server)));
+                  fo_get_server_str_name(server)));
         talloc_free(tmp_ctx);
         return;
     }
@@ -580,7 +580,7 @@ static void sdap_uri_callback(void *private_data, struct fo_server *server)
             tmp = SSS_LDAP_SRV_NAME;
         }
         new_uri = talloc_asprintf(service, "%s://%s:%d",
-                                  tmp, fo_get_server_name(server),
+                                  tmp, fo_get_server_str_name(server),
                                   fo_get_server_port(server));
     } else {
         new_uri = talloc_strdup(service, tmp);
diff --git a/src/tests/fail_over-tests.c b/src/tests/fail_over-tests.c
index efd8756..d8a6d51 100644
--- a/src/tests/fail_over-tests.c
+++ b/src/tests/fail_over-tests.c
@@ -170,7 +170,7 @@ test_resolve_service_callback(struct tevent_req *req)
     if (task->new_server_status >= 0)
         fo_set_server_status(server, task->new_server_status);
 
-    if (strcmp(fo_get_server_name(server), "unknown name")) {
+    if (strcmp(fo_get_server_str_name(server), "unknown name")) {
         he = fo_get_server_hostent(server);
         fail_if(he == NULL, "%s: fo_get_server_hostent() returned NULL");
         for (i = 0; he->addr_list[i]; i++) {
-- 
1.7.6

