]> git.sur5r.net Git - openldap/commitdiff
make Solaris happy with printf of NULLs (ITS#4811?)
authorPierangelo Masarati <ando@openldap.org>
Tue, 23 Jan 2007 01:30:13 +0000 (01:30 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 23 Jan 2007 01:30:13 +0000 (01:30 +0000)
servers/slapd/back-monitor/conn.c

index 7e352ccdf4e737de07b886a034382fada9d3c3a9..45ceade0546f23c1dd1a37f1c9841c0e3a5fcade 100644 (file)
@@ -383,8 +383,10 @@ conn_create(
                        c->c_dn.bv_len ? c->c_dn.bv_val : SLAPD_ANONYMOUS,
                        
                        c->c_listener_url.bv_val,
-                       c->c_peer_domain.bv_val,
-                       c->c_peer_name.bv_val,
+                       BER_BVISNULL( &c->c_peer_domain )
+                               ? "" : c->c_peer_domain.bv_val,
+                       BER_BVISNULL( &c->c_peer_name )
+                               ? "" : c->c_peer_name.bv_val,
                        c->c_sock_name.bv_val,
                        
                        buf2,
@@ -432,6 +434,7 @@ conn_create(
                &c->c_dn, &c->c_ndn );
 
        /* NOTE: client connections leave the c_peer_* fields NULL */
+       assert( !BER_BVISNULL( &c->c_listener_url ) );
        attr_merge_one( e, mi->mi_ad_monitorConnectionListener,
                &c->c_listener_url, NULL );
 
@@ -443,6 +446,7 @@ conn_create(
                BER_BVISNULL( &c->c_peer_name ) ? &bv_unknown : &c->c_peer_name,
                NULL );
 
+       assert( !BER_BVISNULL( &c->c_sock_name ) );
        attr_merge_one( e, mi->mi_ad_monitorConnectionLocalAddress,
                &c->c_sock_name, NULL );