if (( rh = re->re_replicas ) != NULL ) {
for ( i = 0; rh[ i ].rh_hostname != NULL; i++ ) {
free( rh[ i ].rh_hostname );
if (( rh = re->re_replicas ) != NULL ) {
for ( i = 0; rh[ i ].rh_hostname != NULL; i++ ) {
free( rh[ i ].rh_hostname );
Debug( LDAP_DEBUG_ANY, "Re_parse: error: re is NULL\n", 0, 0, 0 );
Debug( LDAP_DEBUG_ANY, "Re_parse: error: re is NULL\n", 0, 0, 0 );
Debug( LDAP_DEBUG_ANY, "Re_parse: error: replbuf is NULL\n", 0, 0, 0 );
Debug( LDAP_DEBUG_ANY, "Re_parse: error: replbuf is NULL\n", 0, 0, 0 );
if ( ldif_parse_line( buf, &type, &value, &len ) < 0 ) {
if ( ldif_parse_line( buf, &type, &value, &len ) < 0 ) {
value = NULL;
} else {
if ( ldif_parse_line( buf, &type, &value, &len ) < 0 ) {
value = NULL;
} else {
if ( ldif_parse_line( buf, &type, &value, &len ) < 0 ) {
char *type, *value, *line, *p;
Rh *rh = NULL;
char *type, *value, *line, *p;
Rh *rh = NULL;
Debug( LDAP_DEBUG_TRACE, "Re_dump: re is NULL\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "Re_dump: re is NULL\n", 0, 0, 0 );
return;
}
fprintf( fp, "Re_dump: ******\n" );
fprintf( fp, "re_refcnt: %d\n", re->re_refcnt );
return;
}
fprintf( fp, "Re_dump: ******\n" );
fprintf( fp, "re_refcnt: %d\n", re->re_refcnt );
fprintf( fp, "re_seq: %d\n", re->re_seq );
for ( i = 0; re->re_replicas && re->re_replicas[ i ].rh_hostname != NULL;
i++ ) {
fprintf( fp, "re_seq: %d\n", re->re_seq );
for ( i = 0; re->re_replicas && re->re_replicas[ i ].rh_hostname != NULL;
i++ ) {
- if ( fprintf( fp, "time: %s.%d\n", re->re_timestamp, re->re_seq ) < 0 ) {
+ if ( fprintf( fp, "time: %ld.%d\n", (long) re->re_timestamp, re->re_seq ) < 0 ) {
- obuf = ldif_type_and_value( re->re_mods[ i ].mi_type,
+ obuf = ldif_put( LDIF_PUT_VALUE,
+ re->re_mods[ i ].mi_type,
re->re_mods[ i ].mi_val ? re->re_mods[ i ].mi_val : "",
re->re_mods[ i ].mi_len );
if ( fputs( obuf, fp ) < 0 ) {
re->re_mods[ i ].mi_val ? re->re_mods[ i ].mi_val : "",
re->re_mods[ i ].mi_len );
if ( fputs( obuf, fp ) < 0 ) {
Debug( LDAP_DEBUG_ANY, "Error while writing: %s\n",
sys_errlist[ errno ], 0, 0 );
Debug( LDAP_DEBUG_ANY, "Error while writing: %s\n",
sys_errlist[ errno ], 0, 0 );
nur++;
ur = (Rh *) ch_realloc( (char *) ur, ( nur * sizeof( Rh )));
ur[ nur - 1 ].rh_hostname = strdup( host );
nur++;
ur = (Rh *) ch_realloc( (char *) ur, ( nur * sizeof( Rh )));
ur[ nur - 1 ].rh_hostname = strdup( host );