X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslurpd%2Flock.c;h=c863d4b9e82c85ecf9ed6b480a6562a97d7d51d1;hb=fad62c5d1dea6fa56e740dd81ce025eaaaab1917;hp=cca1bed3f8ad9aa04e66be56b8fcd194eee46fa5;hpb=7adc0a65d0a3c10daca4352002baadeb76afc7e5;p=openldap diff --git a/servers/slurpd/lock.c b/servers/slurpd/lock.c index cca1bed3f8..c863d4b9e8 100644 --- a/servers/slurpd/lock.c +++ b/servers/slurpd/lock.c @@ -1,3 +1,4 @@ +/* $OpenLDAP$ */ /* * Copyright (c) 1996 Regents of the University of Michigan. * All rights reserved. @@ -18,6 +19,7 @@ #include +#include #include #include #include @@ -26,17 +28,14 @@ #ifdef HAVE_SYS_FILE_H #include #endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif #include "slurp.h" FILE * lock_fopen( - char *fname, - char *type, + const char *fname, + const char *type, FILE **lfp ) { @@ -53,10 +52,7 @@ lock_fopen( } /* acquire the lock */ - while ( ldap_lockf( fileno(*lfp) ) != 0 ) - { - ; /* NULL */ - } + ldap_lockf( fileno(*lfp) ); /* open the log file */ if ( (fp = fopen( fname, type )) == NULL ) { @@ -93,7 +89,7 @@ lock_fclose( */ int acquire_lock( - char *file, + const char *file, FILE **rfp, FILE **lfp ) @@ -115,7 +111,7 @@ acquire_lock( */ int relinquish_lock( - char *file, + const char *file, FILE *rfp, FILE *lfp )