diff options
author | Zandra <[email protected]> | 2016-01-29 17:43:37 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2016-01-29 17:43:37 +0100 |
commit | 57a928b4bc1076b169ecc95e38ab23cf79e03280 (patch) | |
tree | b6edbc2d2238d742772239f7dd64556067071b2f /lib/inets/src/tftp | |
parent | 3eb54b2053f76d3d47eed8774153be0f7a5016c3 (diff) | |
parent | d96471b3f404f7341279d8598dd74d92fb1a923c (diff) | |
download | otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.tar.gz otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.tar.bz2 otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.zip |
Merge branch 'maint-18' into maint
Diffstat (limited to 'lib/inets/src/tftp')
-rw-r--r-- | lib/inets/src/tftp/tftp_engine.erl | 4 | ||||
-rw-r--r-- | lib/inets/src/tftp/tftp_lib.erl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/inets/src/tftp/tftp_engine.erl b/lib/inets/src/tftp/tftp_engine.erl index d0510e795b..8d282a1e9d 100644 --- a/lib/inets/src/tftp/tftp_engine.erl +++ b/lib/inets/src/tftp/tftp_engine.erl @@ -1153,8 +1153,8 @@ match_callback(Filename, Callbacks) -> end. do_match_callback(Filename, [C | Tail]) when is_record(C, callback) -> - case catch inets_regexp:match(Filename, C#callback.internal) of - {match, _, _} -> + case catch re:run(Filename, C#callback.internal, [{capture, none}]) of + match -> {ok, C}; nomatch -> do_match_callback(Filename, Tail); diff --git a/lib/inets/src/tftp/tftp_lib.erl b/lib/inets/src/tftp/tftp_lib.erl index 71327f8023..01dea97d07 100644 --- a/lib/inets/src/tftp/tftp_lib.erl +++ b/lib/inets/src/tftp/tftp_lib.erl @@ -184,7 +184,7 @@ do_parse_config([{Key, Val} | Tail], Config) when is_record(Config, config) -> callback -> case Val of {RegExp, Mod, State} when is_list(RegExp), is_atom(Mod) -> - case inets_regexp:parse(RegExp) of + case re:compile(RegExp) of {ok, Internal} -> Callback = #callback{regexp = RegExp, internal = Internal, @@ -253,7 +253,7 @@ do_parse_config(Options, Config) when is_record(Config, config) -> add_default_callbacks(Callbacks) -> RegExp = "", - {ok, Internal} = inets_regexp:parse(RegExp), + {ok, Internal} = re:compile(RegExp), File = #callback{regexp = RegExp, internal = Internal, module = tftp_file, |