]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove unused exfile_unlock()
authorAlan T. DeKok <aland@freeradius.org>
Tue, 25 Jul 2017 14:25:42 +0000 (10:25 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 25 Jul 2017 14:25:42 +0000 (10:25 -0400)
src/include/exfile.h
src/main/exfile.c

index a3bfbcc99009117746e630f568e76264a70e36d7..037e374c62aa973de404fa72d5e9be864e414e50 100644 (file)
@@ -45,8 +45,6 @@ int           exfile_open(exfile_t *lf, REQUEST *request, char const *filename,
 
 int            exfile_close(exfile_t *lf, REQUEST *request, int fd);
 
-int            exfile_unlock(exfile_t *lf, REQUEST *request, int fd);
-
 #ifdef __cplusplus
 }
 #endif
index ee837a79d5ce7b3fe10dcb335ba3d07a21115463..49f2cb2f6184a2bcfd2fe29edaa3f34244b168a4 100644 (file)
@@ -475,30 +475,3 @@ int exfile_close(exfile_t *ef, REQUEST *request, int fd)
        fr_strerror_printf("Attempt to unlock file which is not tracked");
        return -1;
 }
-
-/** Unlock the file, but leave the dup'd file descriptor open
- *
- */
-int exfile_unlock(exfile_t *ef, REQUEST *request, int fd)
-{
-       uint32_t i;
-
-       for (i = 0; i < ef->max_entries; i++) {
-               if (!ef->entries[i].filename) continue;
-
-               if (ef->entries[i].dup == fd) {
-                       ef->entries[i].dup = -1;
-
-                       pthread_mutex_unlock(&(ef->mutex));
-
-                       exfile_trigger_exec(ef, request, &ef->entries[i], "release");
-
-                       return 0;
-               }
-       }
-
-       pthread_mutex_unlock(&(ef->mutex));
-
-       fr_strerror_printf("Attempt to unlock file which does not exist");
-       return -1;
-}