From a8d55958be2f4aae69c879306c994104378e08e9 Mon Sep 17 00:00:00 2001 From: AICells <1713699517@qq.com> Date: Sat, 11 Apr 2020 17:54:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gen_ipc.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gen_ipc.erl b/src/gen_ipc.erl index ab63607..0b40f16 100644 --- a/src/gen_ipc.erl +++ b/src/gen_ipc.erl @@ -207,7 +207,7 @@ afterCallbackResult(). %% call 所以状态的回调函数 --callback handleCall(EventContent :: term(), From :: {pid(), Tag :: term()}, Status :: term(), State :: term()) -> +-callback handleCall(EventContent :: term(), Status :: term(), State :: term(), From :: {pid(), Tag :: term()}) -> eventCallbackResult(). %% cast 回调函数 @@ -1152,7 +1152,7 @@ receiveMsgWait(#cycleData{hibernateAfter = HibernateAfterTimeout} = CycleData, C matchCallMsg(#cycleData{module = Module} = CycleData, CurStatus, CurState, Debug, {{call, From}, Request} = Event) -> NewDebug = ?SYS_DEBUG(Debug, {in, Event, CurStatus}), - try Module:handleCall(Request, From, CurStatus, CurState) of + try Module:handleCall(Request, CurStatus, CurState, From) of Result -> handleEventCallbackRet(CycleData, CurStatus, CurState, NewDebug, [Event], Result, ?CB_FORM_EVENT, From) catch @@ -1304,7 +1304,7 @@ startEventCall(#cycleData{module = Module} = CycleData, CurStatus, CurState, Deb terminate(Class, Reason, Stacktrace, CycleData, CurStatus, CurState, Debug, LeftEvents) end; {'call', From} -> - try Module:handleCall(Content, CurStatus, CurState) of + try Module:handleCall(Content, CurStatus, CurState, From) of Result -> handleEventCallbackRet(CycleData, CurStatus, CurState, Debug, LeftEvents, Result, ?CB_FORM_EVENT, From) catch