<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Did you had a chance to try this solution? Does it work to provide the
policy-file? How do you set that up?<br>
<br>
Thanks,<br>
<br>
Sergio<br>
<br>
Badlop wrote:
<blockquote
 cite="mid:732f49190806090953t28e68b60k9016e2e198d29b35@mail.gmail.com"
 type="cite">
  <pre wrap="">On Mon, Jun 9, 2008 at 2:54 PM,  <a class="moz-txt-link-rfc2396E" href="mailto:cplusou-s@yahoo.fr">&lt;cplusou-s@yahoo.fr&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">How is it possible to modify this script to make it works with the latest
version of ejabberd_c2s.erl file ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Try this. I only verified it compiles.
If it really works, please report here, maybe other people is
interested in the patch.


*****************************
--- src/ejabberd_c2s.erl
+++ src/ejabberd_c2s.erl
@@ -387,6 +387,17 @@ wait_for_stream({xmlstreamend, _}, StateData) -&gt;
     send_text(StateData, ?INVALID_XML_ERR ++ ?STREAM_TRAILER),
     {stop, normal, StateData};

+wait_for_stream({xmlstreamstart, "policy-file-request", _Attrs}, StateData) -&gt;
+    ejabberd_socket:reset_stream(StateData#state.socket),
+    send_text(StateData,
+             "&lt;?xml version=\"1.0\"?&gt;\n"
+             "&lt;!DOCTYPE cross-domain-policy SYSTEM "
+             "\<a class="moz-txt-link-rfc2396E" href="http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\"</a>&gt;\n"
+             "&lt;cross-domain-policy&gt;\n"
+             "       &lt;allow-access-from domain=\"*\" to-ports=\"*\"/&gt;\n"
+             "&lt;/cross-domain-policy&gt;\n\0"),
+    {stop, normal, StateData};
+
 wait_for_stream({xmlstreamerror, _}, StateData) -&gt;
     Header = io_lib:format(?STREAM_HEADER,
                           ["none", ?MYNAME, " version='1.0'", ""]),
**********************
_______________________________________________
ejabberd mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ejabberd@jabber.ru">ejabberd@jabber.ru</a>
<a class="moz-txt-link-freetext" href="http://lists.jabber.ru/mailman/listinfo/ejabberd">http://lists.jabber.ru/mailman/listinfo/ejabberd</a>
  </pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<title></title>
<font face="Verdana"><big>S&eacute;rgio Bessa</big></font><br>
<font face="Arial"><small><b><font color="#000000"><big>Ideavity, Lda.</big></font></b></small><br>
<small><b>www</b>: <a href="http://www.ideavity.com">http://www.ideavity.com</a><br>
<b>email</b>: <a class="moz-txt-link-abbreviated" href="mailto:sergio.bessa@ideavity.com">sergio.bessa@ideavity.com</a><br>
<b>tel.</b> +351 222 012 393</small></font><br>
<br>
</div>
</body>
</html>