Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow sends to {enet_eth_iface, Pid}.

  • Loading branch information...
commit bfd8f3c08113c30942d2286cdaeee84651201a2c 1 parent f3f2c3f
@archaelus authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/enet_eth_iface.erl
View
7 src/enet_eth_iface.erl
@@ -44,8 +44,11 @@ start_link(Device, IfConfig) when is_list(Device), is_list(IfConfig) ->
start(Device, IfConfig) when is_list(Device), is_list(IfConfig) ->
gen_server:start(?MODULE, [#state{dev=Device}, IfConfig], []).
-send(Interface, Data) ->
- gen_server:cast(Interface, {send, Data}).
+
+send({?MODULE, Pid}, Data) ->
+ send(Pid, Data);
+send(Pid, Data) when is_pid(Pid) ->
+ gen_server:cast(Pid, {send, Data}).
%%====================================================================
%% gen_server callbacks
Please sign in to comment.
Something went wrong with that request. Please try again.