From a285a07dda95ae01755a047bf3a56b7b7571d734 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 22 Aug 1997 21:45:04 +0000 Subject: (netfs_maxsymlinks): Initialize to 12. (parse_common_opt): Release DEBUG_LOCK even if we get an error. --- ftpfs/ftpfs.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'ftpfs') diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c index 8897e5bd..bef0dbd0 100644 --- a/ftpfs/ftpfs.c +++ b/ftpfs/ftpfs.c @@ -57,7 +57,7 @@ struct ftpfs_params ftpfs_params; volatile struct mapped_time_value *ftpfs_maptime; -int netfs_maxsymlinks = 0; +int netfs_maxsymlinks = 12; extern error_t lookup_server (const char *server, struct ftp_conn_params **params, int *h_err); @@ -160,25 +160,28 @@ parse_common_opt (int key, char *arg, struct argp_state *state) if (! debug_stream_name) { argp_failure (state, 0, ENOMEM, "%s: Cannot open debugging file", arg); - return ENOMEM; + err = ENOMEM; } - debug_stream = fopen (arg, "w+"); - if (! debug_stream) + if (! err) { - error_t err = errno; - argp_failure (state, 0, err, "%s: Cannot open debugging file", arg); - return err; + debug_stream = fopen (arg, "w+"); + if (! debug_stream) + { + error_t err = errno; + argp_failure (state, 0, err, "%s: Cannot open debugging file", arg); + } } } else debug_stream = stderr; - ftpfs_ftp_hooks.cntl_debug = cntl_debug; + if (err) + ftpfs_ftp_hooks.cntl_debug = cntl_debug; mutex_unlock (&debug_lock); - break; + return err; case OPT_NO_DEBUG: mutex_lock (&debug_lock); -- cgit v1.2.3