Permalink
Browse files

rewrite coders and decoders

  • Loading branch information...
1 parent 54b0050 commit 325584e3b8abfe039b40b87a151ea0773c63e699 @gleber committed Apr 25, 2012
Showing with 171 additions and 210 deletions.
  1. +3 −6 src/acl.erl
  2. +117 −102 src/fipa_ontology_sl_codec.erl
  3. +4 −4 src/mtp.erl
  4. +33 −51 src/ontology.erl
  5. +14 −47 src/sl.erl
View
@@ -61,7 +61,7 @@ erlang_to_sl0(ErlangSentence) ->
%%%
sl0_parse(M) ->
- {ok, sl:decode(M)}.
+ sl:decode(M).
%% returns {error, ErrorCond} or {ok, Terms}
@@ -157,9 +157,7 @@ sendacl(Message) ->
%%io:format ("Receivers ~w~n", [Receivers]),
%% encode content
EncodedContent = ["\"",
- case
- ontology_service:get_codec(Message#aclmessage.ontology)
- of
+ case ontology_service:get_codec(Message#aclmessage.ontology) of
{ok, Codec} ->
SL = Codec:encode(Message#aclmessage.content),
sl:encode(SL);
@@ -170,8 +168,7 @@ sendacl(Message) ->
receiver = Receivers,
content = iolist_to_binary(EncodedContent)}),
TransformedMessage = list_to_tuple(Temp),
- [mtp:http_mtp_encode_and_send(X, Sender, TransformedMessage)
- || X <- Receivers],
+ [mtp:http_mtp_encode_and_send(X, Sender, TransformedMessage) || X <- Receivers],
ok.
inform(Message) ->
Oops, something went wrong.

0 comments on commit 325584e

Please sign in to comment.