diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/src/inet_db.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl index 7278ec460d..465cec1b45 100644 --- a/lib/kernel/src/inet_db.erl +++ b/lib/kernel/src/inet_db.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -514,8 +514,7 @@ res_update(Tag, TagTm, TagInfo, TagSetTm, SetFun) -> undefined -> ok; TM -> case times() of - Now when Now >= TM + ?RES_FILE_UPDATE_TM; - (TM =:= 0 andalso Now < ?RES_FILE_UPDATE_TM) -> + Now when Now >= TM + ?RES_FILE_UPDATE_TM -> case db_get(Tag) of undefined -> SetFun(""); @@ -1207,7 +1206,8 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From, File = filename:flatten(Fname), ets:insert(Db, {res_optname(Option), File}), ets:insert(Db, {TagInfo, undefined}), - ets:insert(Db, {TagTm, 0}), + TimeZero = - (?RES_FILE_UPDATE_TM + 1), % Early enough + ets:insert(Db, {TagTm, TimeZero}), {reply,ok,State}; true -> File = filename:flatten(Fname), |