aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/mod_disk_log.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-01-29 15:13:38 +0100
committerErlang/OTP <[email protected]>2016-01-29 15:13:38 +0100
commit80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2 (patch)
tree60f2d2fa5efdb3a837a3102388c5462ab32f0ef0 /lib/inets/src/http_server/mod_disk_log.erl
parent7cf9a621c5280a3e97967c4c63ab6ca1adde69c3 (diff)
parenta6a766143bd5332ff0173a9a3c05e3b36d20297c (diff)
downloadotp-80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2.tar.gz
otp-80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2.tar.bz2
otp-80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2.zip
Merge branch 'ia/maint/inets/mod_alias/OTP-13248' into maint-18
* ia/maint/inets/mod_alias/OTP-13248: inets: Prepare for release inets: Traverse all aliases looking for the longest match inets: Use re instead of inets_regexp # Conflicts: # lib/inets/vsn.mk
Diffstat (limited to 'lib/inets/src/http_server/mod_disk_log.erl')
-rw-r--r--lib/inets/src/http_server/mod_disk_log.erl25
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/inets/src/http_server/mod_disk_log.erl b/lib/inets/src/http_server/mod_disk_log.erl
index a0ff929a34..5e395a2118 100644
--- a/lib/inets/src/http_server/mod_disk_log.erl
+++ b/lib/inets/src/http_server/mod_disk_log.erl
@@ -138,8 +138,8 @@ do(Info) ->
%% Description: See httpd(3) ESWAPI CALLBACK FUNCTIONS
%%-------------------------------------------------------------------------
load("TransferDiskLogSize " ++ TransferDiskLogSize, []) ->
- case inets_regexp:split(TransferDiskLogSize," ") of
- {ok,[MaxBytes,MaxFiles]} ->
+ try re:split(TransferDiskLogSize, " ", [{return, list}]) of
+ [MaxBytes, MaxFiles] ->
case make_integer(MaxBytes) of
{ok,MaxBytesInteger} ->
case make_integer(MaxFiles) of
@@ -151,17 +151,20 @@ load("TransferDiskLogSize " ++ TransferDiskLogSize, []) ->
?NICE(string:strip(TransferDiskLogSize)++
" is an invalid TransferDiskLogSize")}
end;
- {error,_} ->
+ _ ->
{error,?NICE(string:strip(TransferDiskLogSize)++
- " is an invalid TransferDiskLogSize")}
+ " is an invalid TransferDiskLogSize")}
end
+ catch _:_ ->
+ {error,?NICE(string:strip(TransferDiskLogSize) ++
+ " is an invalid TransferDiskLogSize")}
end;
load("TransferDiskLog " ++ TransferDiskLog,[]) ->
{ok,[],{transfer_disk_log,string:strip(TransferDiskLog)}};
load("ErrorDiskLogSize " ++ ErrorDiskLogSize, []) ->
- case inets_regexp:split(ErrorDiskLogSize," ") of
- {ok,[MaxBytes,MaxFiles]} ->
+ try re:split(ErrorDiskLogSize," ", [{return, list}]) of
+ [MaxBytes,MaxFiles] ->
case make_integer(MaxBytes) of
{ok,MaxBytesInteger} ->
case make_integer(MaxFiles) of
@@ -176,13 +179,16 @@ load("ErrorDiskLogSize " ++ ErrorDiskLogSize, []) ->
{error,?NICE(string:strip(ErrorDiskLogSize)++
" is an invalid ErrorDiskLogSize")}
end
+ catch _:_ ->
+ {error,?NICE(string:strip(ErrorDiskLogSize) ++
+ " is an invalid TransferDiskLogSize")}
end;
load("ErrorDiskLog " ++ ErrorDiskLog, []) ->
{ok, [], {error_disk_log, string:strip(ErrorDiskLog)}};
load("SecurityDiskLogSize " ++ SecurityDiskLogSize, []) ->
- case inets_regexp:split(SecurityDiskLogSize, " ") of
- {ok, [MaxBytes, MaxFiles]} ->
+ try re:split(SecurityDiskLogSize, " ", [{return, list}]) of
+ [MaxBytes, MaxFiles] ->
case make_integer(MaxBytes) of
{ok, MaxBytesInteger} ->
case make_integer(MaxFiles) of
@@ -198,6 +204,9 @@ load("SecurityDiskLogSize " ++ SecurityDiskLogSize, []) ->
{error, ?NICE(string:strip(SecurityDiskLogSize) ++
" is an invalid SecurityDiskLogSize")}
end
+ catch _:_ ->
+ {error,?NICE(string:strip(SecurityDiskLogSize) ++
+ " is an invalid SecurityDiskLogSize")}
end;
load("SecurityDiskLog " ++ SecurityDiskLog, []) ->
{ok, [], {security_disk_log, string:strip(SecurityDiskLog)}};