add debug
This commit is contained in:
parent
6fe4642b61
commit
d5b49d2b55
@ -225,7 +225,7 @@ handle_call({assign_ip_addr, ChannelPid, ClientId, Mac, NetAddr0}, _From,
|
|||||||
|
|
||||||
%% 分配ip地址的时候,以mac地址为唯一基准
|
%% 分配ip地址的时候,以mac地址为唯一基准
|
||||||
lager:debug("[sdlan_network] alloc_ip, network_id: ~p, ips: ~p, client_id: ~p, mac: ~p, net_addr: ~p",
|
lager:debug("[sdlan_network] alloc_ip, network_id: ~p, ips: ~p, client_id: ~p, mac: ~p, net_addr: ~p",
|
||||||
[NetworkId, Ips, ClientId, Mac, NetAddr0]),
|
[NetworkId, Ips, ClientId, sdlan_util:format_mac(Mac), sdlan_ipaddr:int_to_ipv4(NetAddr0)]),
|
||||||
|
|
||||||
case client_model:alloc_ip(NetworkId, Ips, ClientId, Mac, NetAddr0) of
|
case client_model:alloc_ip(NetworkId, Ips, ClientId, Mac, NetAddr0) of
|
||||||
{ok, Ip} ->
|
{ok, Ip} ->
|
||||||
@ -423,7 +423,7 @@ handle_cast({forward, _Sock, SrcMac, DstMac, _Packet}, State = #state{network_id
|
|||||||
|
|
||||||
%% 删除ip的占用并关闭channel
|
%% 删除ip的占用并关闭channel
|
||||||
handle_cast({unregister, _ClientId, Mac}, State = #state{network_id = NetworkId, used_map = UsedMap}) ->
|
handle_cast({unregister, _ClientId, Mac}, State = #state{network_id = NetworkId, used_map = UsedMap}) ->
|
||||||
lager:debug("[sdlan_network] networkd_id: ~p, unregister Mac: ~p", [NetworkId, Mac]),
|
lager:debug("[sdlan_network] networkd_id: ~p, unregister Mac: ~p", [NetworkId, sdlan_util:format_mac(Mac)]),
|
||||||
case maps:take(Mac, UsedMap) of
|
case maps:take(Mac, UsedMap) of
|
||||||
error ->
|
error ->
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user