mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fix server==NULL bugs
This commit is contained in:
parent
f422f01109
commit
17c37bb7c3
1 changed files with 4 additions and 2 deletions
|
|
@ -295,13 +295,15 @@ status( void )
|
|||
if (debug & D_TRACE)
|
||||
printf("->status()\n");
|
||||
#endif
|
||||
printf(" Current server is %s", server);
|
||||
printf(" Current server is %s", server != NULL ? server : "<default>" );
|
||||
if ( ld != NULL ) {
|
||||
char *host = NULL;
|
||||
|
||||
ldap_get_option(ld, LDAP_OPT_HOST_NAME, &host);
|
||||
|
||||
if (( host != NULL ) && (strcasecmp( host, server ) != 0 )) {
|
||||
if ( host != NULL &&
|
||||
( server == NULL || strcasecmp( host, server ) != 0 ) )
|
||||
{
|
||||
printf( " (%s)", host );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue