Make strings read as lists, not as binary


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666381 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/alterl/src/thrift_binary_protocol.erl b/lib/alterl/src/thrift_binary_protocol.erl
index f71e547..4e8cfb3 100644
--- a/lib/alterl/src/thrift_binary_protocol.erl
+++ b/lib/alterl/src/thrift_binary_protocol.erl
@@ -214,7 +214,8 @@
 
 read(This, string) ->
     {ok, Sz}  = read(This, i32),
-    read(This, Sz);
+    {ok, Bin} = read(This, Sz),
+    {ok, binary_to_list(Bin)};
 
 read(This, Len) when is_integer(Len), Len >= 0 ->
     thrift_transport:read(This#binary_protocol.transport, Len).
diff --git a/lib/alterl/src/thrift_processor.erl b/lib/alterl/src/thrift_processor.erl
index 742bc28..c193946 100644
--- a/lib/alterl/src/thrift_processor.erl
+++ b/lib/alterl/src/thrift_processor.erl
@@ -29,7 +29,7 @@
     case thrift_protocol:read(IProto, message_begin) of
         #protocol_message_begin{name = Function,
                                 type = ?tMessageType_CALL} ->
-            ok= handle_function(State, list_to_atom(binary_to_list(Function))),
+            ok= handle_function(State, list_to_atom(Function)),
             loop(State);
         {error, closed} ->
             error_logger:info_msg("Client disconnected~n"),