diff options
Diffstat (limited to 'tests/ftp.pm')
-rw-r--r-- | tests/ftp.pm | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/ftp.pm b/tests/ftp.pm index b3cc14abb..421fee1a6 100644 --- a/tests/ftp.pm +++ b/tests/ftp.pm @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -84,4 +84,25 @@ sub ftpkillslaves { } } + +sub set_advisor_read_lock { + my ($filename) = @_; + + if(open(FILEH, ">$filename")) { + close(FILEH); + return; + } + printf "Error creating lock file $filename error: $!"; +} + + +sub clear_advisor_read_lock { + my ($filename) = @_; + + if(-f $filename) { + unlink($filename); + } +} + + 1; |