Commit d6e058fb authored by Philipp Huebner's avatar Philipp Huebner

Merge tag 'upstream/1.0.7'

Upstream version 1.0.7
parents 2b85efd0 ea56ffe4
# Version 1.0.7
* Fix coverall invocation (Paweł Chmielowski)
* Fix p1_server timeout handling, R18 compatibility (Alexey Shchepin)
# Version 1.0.6
* Add p1_http
# Version 1.0.5
* Erlang R19 compliance (Paweł Chmielowski)
# Version 1.0.4
* Adds p1_time_compat:unique_timestamp() that returns value resembling what now() was returning
......
......@@ -10,5 +10,7 @@ p1_utils is an application containing ProcessOne modules and tools that are leve
* `treap` is a treap algorithm implementation. It is a randomized binary search tree. See: https://en.wikipedia.org/wiki/Treap
* `p1_time_compat` is a module to ease support and migration of Erlang
time management function from Erlang R16/R17 to Erlang R18.
* `p1_http` is an http client which provides a common API for inets / lhttpc / ibrowse
If you have `rebar` binary, you can generate `p1_utils` documentation by running `rebar3 edoc`.
......@@ -8,7 +8,7 @@
<body bgcolor="white" class="mainpane">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.process-one.net" target="_top"><img src="logo_p1.png" align="right" border="0" alt="Logo"></a></td></tr></table></div>
<h1>P1 Erlang Utils</h1>
<p>Copyright © 2002-2015 ProcessOne</p>
<p>Copyright © 2002-2017 ProcessOne</p>
<p><b>Version:</b> 1.0.0</p>
<p><b>Authors:</b> ProcessOne [<em>web site:</em> <tt><a href="http://www.process-one.net" target="_top">http://www.process-one.net</a></tt>].</p>
<p>
......
@author ProcessOne [http://www.process-one.net]
@copyright 2002-2015 ProcessOne
@copyright 2002-2017 ProcessOne
@version 1.0.0
@title P1 Erlang Utils
@doc
......
......@@ -4,7 +4,7 @@
%%% Purpose : Rebar build script. Compliant with rebar and rebar3.
%%% Created : 24 Nov 2015 by Mickael Remond <mremond@process-one.net>
%%%
%%% Copyright (C) 2002-2015 ProcessOne, SARL. All Rights Reserved.
%%% Copyright (C) 2002-2017 ProcessOne, SARL. 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.
......@@ -67,7 +67,7 @@ Config = case os:getenv("TRAVIS") of
"true" ->
JobId = os:getenv("TRAVIS_JOB_ID"),
Cfg3 = ModCfg(Cfg2, [deps], fun(V) -> [{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", "master"}}|V] end, []),
ModCfg(Cfg3, [post_hooks], fun(V) -> V ++ [{eunit, "echo '\n%%! -pa .eunit/ deps/coveralls/ebin\nmain(_)->{ok,F}=file:open(\"erlang.json\",[write]),io:fwrite(F,\"~s\",[coveralls:convert_file(\".eunit/cover.coverdata\", \""++JobId++"\", \"travis-ci\")]).' > getcover.erl"},
ModCfg(Cfg3, [post_hooks], fun(V) -> V ++ [{eunit, "echo '\n%%! -pa .eunit/ deps/coveralls/ebin\nmain(_)->{ok,F}=file:open(\"erlang.json\",[write]),io:fwrite(F,\"~s\",[coveralls:convert_file(\".eunit/cover.coverdata\", \""++JobId++"\", \"travis-ci\",\"\")]).' > getcover.erl"},
{eunit, "escript ./getcover.erl"}] end, []);
_ ->
Cfg2
......
......@@ -15,7 +15,7 @@
%%
%% The code has been modified and improved by ProcessOne.
%%
%% Copyright 2007-2015 ProcessOne
%% Copyright 2007-2017 ProcessOne
%%
%% The change adds the following features:
%% - You can send exit(priority_shutdown) to the p1_fsm process to
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
%%% Created : 7 Oct 2015 by Paweł Chmielowski <pawel@process-one.net>
%%%
%%%
%%% Copyright (C) 2002-2015 ProcessOne, SARL. All Rights Reserved.
%%% Copyright (C) 2002-2017 ProcessOne, SARL. 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.
......
......@@ -18,7 +18,7 @@
%%
%% The code has been modified and improved by ProcessOne.
%%
%% Copyright 2007-2015 ProcessOne
%% Copyright 2007-2017 ProcessOne
%%
%% The change adds the following features:
%% - You can send exit(priority_shutdown) to the p1_fsm process to
......@@ -114,6 +114,8 @@
-export([system_continue/3,
system_terminate/4,
system_code_change/4,
system_get_state/1,
system_replace_state/2,
format_status/2]).
%% Internal exports
......@@ -439,7 +441,7 @@ collect_messages(Queue, QueueLen, Time) ->
Input ->
{Input, Queue, QueueLen}
after Time ->
{{'$gen_event', timeout}, Queue, QueueLen}
{timeout, Queue, QueueLen}
end
end
end.
......@@ -459,15 +461,6 @@ decode_msg(Msg, Parent, Name, State, Mod, Time, Debug,
Limits, Queue, QueueLen, Hib) ->
put('$internal_queue_len', QueueLen),
case Msg of
{system, From, get_state} ->
sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
{State, [Name, State, Mod, Time,
Limits, Queue, QueueLen]}, Hib);
{system, From, {replace_state, StateFun}} ->
NState = try StateFun(State) catch _:_ -> State end,
sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
{NState, [Name, NState, Mod, Time,
Limits, Queue, QueueLen]}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[Name, State, Mod, Time,
......@@ -808,6 +801,17 @@ system_code_change([Name, State, Mod, Time,
Else -> Else
end.
system_get_state([_Name, State, _Mod, _Time,
_Limits, _Queue, _QueueLen]) ->
{ok, State}.
system_replace_state(StateFun,
[Name, State, Mod, Time,
Limits, Queue, QueueLen]) ->
NState = StateFun(State),
{ok, NState, [Name, NState, Mod, Time,
Limits, Queue, QueueLen]}.
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
......
{application, p1_utils,
[
{description, "Erlang utility modules from ProcessOne"},
{vsn, "1.0.5"},
{vsn, "1.0.7"},
{modules, []},
{registered, []},
{applications, [
......
......@@ -5,7 +5,7 @@
%%% Created : 22 Apr 2008 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% Copyright (C) 2002-2015 ProcessOne, SARL. All Rights Reserved.
%%% Copyright (C) 2002-2017 ProcessOne, SARL. 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment