]> granicus.if.org Git - ejabberd/commitdiff
* src/extauth.erl: Log strange responses from extauth script. Use
authorBadlop <badlop@process-one.net>
Sat, 17 May 2008 11:44:25 +0000 (11:44 +0000)
committerBadlop <badlop@process-one.net>
Sat, 17 May 2008 11:44:25 +0000 (11:44 +0000)
timeout (EJAB-627)

SVN Revision: 1330

ChangeLog
src/extauth.erl

index abf7f439c2b88c3503022437b0ef5db484e15358..7b1cec7ea1f14f1e2f3e26f98751c7db375cfdbf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-17  Badlop  <badlop@process-one.net>
+
+       * src/extauth.erl: Log strange responses from extauth script. Use
+       timeout (EJAB-627)
+
+2008-05-16  Badlop  <badlop@process-one.net>
+
+       * src/mod_muc/mod_muc_room.erl: Allow change_state of a room
+
 2008-05-16  Christophe Romain <christophe.romain@process-one.net>
 
        * src/ejabberd_s2s_out.erl: Change FSMTIMEOUT to 30s
index 052e95d7ae58b92c4ca20492557c857ab15a5326..3819fcddfad8ef2fcfe17418919515e69e8838b3 100644 (file)
@@ -32,6 +32,8 @@
 
 -include("ejabberd.hrl").
 
+-define(CALL_TIMEOUT, 30000). % Timeout is in milliseconds: 30 seconds == 30000
+
 start(Host, ExtPrg) ->
     spawn(?MODULE, init, [Host, ExtPrg]).
 
@@ -67,7 +69,13 @@ loop(Port) ->
            Port ! {self(), {command, encode(Msg)}},
            receive
                {Port, {data, Data}} ->
-                   Caller ! {eauth, decode(Data)}
+                    ?DEBUG("extauth call '~p' received data response:~n~p", [Msg, Data]),
+                   Caller ! {eauth, decode(Data)};
+                {Port, Other} ->
+                    ?ERROR_MSG("extauth call '~p' received strange response:~n~p", [Msg, Other])
+            after
+                ?CALL_TIMEOUT ->
+                    ?ERROR_MSG("extauth call '~p' didn't receive response~n", [Msg])
            end,
            loop(Port);
        stop ->