1. arkdro
  2. odeci

Commits

arkdro  committed 5f77a42

change api for list multiply

  • Participants
  • Parent commits ea7905e
  • Branches master

Comments (0)

Files changed (1)

File erlang/src/c_server.erl

View file
  • Ignore whitespace
          sum/1,
          info/1,
          get/0,
-         multiply/1,
+         multiply_list/1,
          ping/0
         ]).
 
     gen_server:call(?SERVER, {info, Term}).
 
 %-------------------------------------------------------------------
-multiply(List) ->
-    gen_server:call(?SERVER, {mult, List}).
+multiply_list(List) ->
+    gen_server:call(?SERVER, {multiply_list, List}).
 
 sum(List) ->
     gen_server:call(?SERVER, {sum, List}).
     Cmd = term_to_binary({get, none}),
     port_command(Port, Cmd),
     {noreply, State#state{from=From}};
-handle_call({mult, Term}, From, #state{status=running, port=Port} = State) ->
+handle_call({multiply_list, Term}, From,
+            #state{status=running, port=Port} = State) ->
     Cmd = term_to_binary({mult_list, Term}),
     port_command(Port, Cmd),
     {noreply, State#state{from=From}};