sccp_{links,user}: link to the user process
This means we get notified if the process dies, i.e. we can remove it from our ets tables.
This commit is contained in:
parent
f8b852c2e0
commit
d975d90fcc
|
@ -114,9 +114,10 @@ handle_call({register_linkset, {LocalPc, RemotePc, Name}},
|
|||
false ->
|
||||
{reply, {error, ets_insert}, S};
|
||||
_ ->
|
||||
% FIXME: We need to trap the user Pid for EXIT
|
||||
% We need to trap the user Pid for EXIT
|
||||
% in order to automatically remove any links/linksets if
|
||||
% the user process dies
|
||||
link(FromPid),
|
||||
{reply, ok, S}
|
||||
end;
|
||||
|
||||
|
@ -137,9 +138,10 @@ handle_call({register_link, {LsName, Sls, Name}},
|
|||
false ->
|
||||
{reply, {error, link_exists}, S};
|
||||
_ ->
|
||||
% FIXME: We need to trap the user Pid for EXIT
|
||||
% We need to trap the user Pid for EXIT
|
||||
% in order to automatically remove any links if
|
||||
% the user process dies
|
||||
link(FromPid),
|
||||
{reply, ok, S}
|
||||
end;
|
||||
_ ->
|
||||
|
|
|
@ -90,6 +90,10 @@ handle_call({bind_ssn, Ssn, Pc}, {FromPid, _FromRef}, S) ->
|
|||
false ->
|
||||
{reply, {error, ets_insert}, S};
|
||||
Error ->
|
||||
% We need to trap the user Pid for EXIT
|
||||
% in order to automatically remove any SSN if
|
||||
% the user process dies
|
||||
link(FromPid),
|
||||
{reply, ok, S}
|
||||
end;
|
||||
|
||||
|
|
Loading…
Reference in New Issue