[thrift] otpification and sane configuration for Erlang Thrift

Summary: a small victory in the neverending quest of OTPifying this binding -- search for config files in ./conf/ (relative to the cwd of the emulator).  for example, when you start the channel server, ./conf/{channel,thrift}.conf should exist.  better than having to recompile to change a configuration ... reconfig should take care of that in running code.

Test Plan: works with channel server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665284 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/src/transport/tSocket.erl b/lib/erl/src/transport/tSocket.erl
index 491d86b..c2bf920 100644
--- a/lib/erl/src/transport/tSocket.erl
+++ b/lib/erl/src/transport/tSocket.erl
@@ -17,8 +17,8 @@
 
 -export([attr/4, super/0, inspect/1]).
 
--export([new/0, new/1, new/2, 
-	 effectful_setHandle/2, effectful_open/1, 
+-export([new/0, new/1, new/2,
+	 effectful_setHandle/2, effectful_open/1,
 	 isOpen/1, write/2, read/2, effectful_close/1]).
 
 %%%
@@ -91,6 +91,9 @@
     Handle = oop:get(This, handle),
     Val = gen_tcp:send(Handle, Str),
 
+    %% DEBUG
+    %% error_logger:info_msg("tSocket: wrote ~p~n", [Str]),
+
     %% error_logger:info_msg("WRITE |~p| (~p)", [Str,Val]),
     
     case Val of
@@ -108,6 +111,8 @@
 	    Port = oop:get(This, port),
 	    throw(tTransportException:new(?tTransportException_UNKNOWN, "TSocket: Could not read " ++ Sz ++ "bytes from " ++ Host ++ ":" ++ Port));
 	{ok, Data} ->
+	    %% DEBUG
+	    %% io:format("tSocket: read ~p~n", [Data]),
 	    Data;
 	{error, Error} ->
 	    exit(tTransportException:new(?tTransportException_NOT_OPEN, "in tSocket:read/2: gen_tcp:recv"))