Skip to content
Browse files

progname got from app-setting:port_executable. If no such setting is …

…present - falls back to priv/procket
  • Loading branch information...
1 parent 5874e8f commit af8b361efc9cb056f25df9688f22190d200cb783 @RGafiyatullin RGafiyatullin committed Mar 11, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/procket.erl
View
9 src/procket.erl
@@ -274,8 +274,13 @@ is_device(Name) when is_list(Name) ->
progname() ->
% Is there a proper way of getting App-Name in this context?
- PrivD = code:priv_dir( ?MODULE ),
- filename:join([ PrivD, ?MODULE ]).
+ case application:get_env( ?MODULE, port_executable ) of
+ {ok, Executable} -> Executable;
+ undefined -> filename:join([
+ code:priv_dir( ?MODULE ),
+ ?MODULE
+ ])
+ end.
%% Protocol family (aka domain)
family(unspec) -> 0;

0 comments on commit af8b361

Please sign in to comment.
Something went wrong with that request. Please try again.