On Wed, 2011-07-20 at 13:16 +0200, Jan Zelený wrote:
> Attached are two more-or-less cosmetic changes.
>
> The current fo_get_server_name() always returns a string, and for
> example, if the name is not set, it returns "unknown name". While this
> is handy is cases like debug printing, I think that there should be a
> more low-level function that would just return NULL for no name set.
>
> [PATCH 1/2] Rename fo_get_server_name to fo_get_server_str_name
> I think this name better reflects the nature of the function
>
> [PATCH 2/2] fo_get_server_name() getter for a server name
> This new function returns the host name if set and NULL otherwise. It is
> much handier in tests (see the src/tests/fail_over-tests.c hunk for
> example). It also allows us to be more defensive in the resolve
> callbacks where it is no longer possible to construct an URI like
> 'ldap://"unknown server"', we would rather get an error message
instead.
Ack to both.
Please note that these patches depend on Jakub's previous patch:
0002-Only-print-server-address-if-one-is-available.patch
Pushed to master.
Simo.
--
Simo Sorce * Red Hat, Inc * New York