}
/* acquire the lock */
- while ( ldap_lockf( *lfp ) != 0 )
- {
- ; /* NULL */
- }
+ ldap_lockf( fileno(*lfp) );
/* open the log file */
if ( (fp = fopen( fname, type )) == NULL ) {
Debug( LDAP_DEBUG_ANY,
"Error: could not open \"%s\"\n", fname, 0, 0 );
- ldap_unlockf( *lfp );
+ ldap_unlockf( fileno(*lfp) );
fclose( *lfp );
*lfp = NULL;
return( NULL );
)
{
/* unlock */
- ldap_unlockf( lfp );
+ ldap_unlockf( fileno(lfp) );
fclose( lfp );
return( fclose( fp ) );