[JDEV] ICQ Transport with Jabber 1.2 - still getting remote server error
Vincent Lim
vincent.lim at payperfect.com
Tue Nov 14 05:33:14 CST 2000
Oops, just realised that I actually installed the wrong version of libetherx. Searched the cvs and found the version with ehandler_new_ex.
Compiled it, and re-compiled the icq transport. Compiles well now. But, I still cannot get to register the service in JabberIM client. I am still getting Remote Server error.
Here's what happens on jabberd when I start the icqtransport:
=============================================
Tue Nov 14 19:23:06 2000 base_accept.c:453 new connection on port 2222 from ip
192.168.1.2 as fd 12
Tue Nov 14 19:23:06 2000 log.c:105 <log type='notice' from='-internal'>base_acc
ept: new connection on port 2222 from ip 192.168.1.2</log>
Tue Nov 14 19:23:06 2000 deliver.c:472 DELIVER 3:-internal <log type='notice' f
rom='-internal'>base_accept: new connection on port 2222 from ip 192.168.1.2</lo
g>
Tue Nov 14 19:23:06 2000 deliver.c:344 delivering to instance 'logger'
20001114T11:23:06: [notice] (-internal): base_accept: new connection on port 222
2 from ip 192.168.1.2
Tue Nov 14 19:23:06 2000 base_accept.c:308 io thread starting for 12
Tue Nov 14 19:23:06 2000 base_accept.c:328 io read event for 12
Tue Nov 14 19:23:06 2000 base_accept.c:205 socket connected, sending xstream he
ader: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org
/streams' id='3A11209A' xmlns='jabber:component:accept'>
Tue Nov 14 19:23:06 2000 base_accept.c:328 io read event for 12
Tue Nov 14 19:23:06 2000 base_accept.c:213 base_accept: <handshake>7388f5590194
27ae1ee9ac57789e6fbf49840c1d</handshake>
Tue Nov 14 19:23:06 2000 base_accept.c:234 Checking:
7388f559019427ae1ee9ac57789e6fbf49840c1d
7388f559019427ae1ee9ac57789e6fbf49840c1d
Here's what happens on icqtransport when I start the icqtransport:
=============================================
Tue Nov 14 19:23:06 2000 debug/main.c:254 [main] ICQ transport bootstrap ...
Tue Nov 14 19:23:06 2000 debug/from_etherx.c:169 [from_etherx_start] kickoff he
re (host icq.payperfect.com, namespace jabber:component:accept)
Tue Nov 14 19:23:06 2000 debug/ehandler.c:44 ehandler_new(icq.payperfect.com,ja
bber:component:accept)
Tue Nov 14 19:23:06 2000 debug/ehlist.c:26 list_add(icq.payperfect.com)
Tue Nov 14 19:23:06 2000 debug/etherxs.c:124 attempting socket connect to 192.1
68.1.2 for transport icq.payperfect.com
Tue Nov 14 19:23:06 2000 debug/xmlstream.c:26 xmlstream_connect
Tue Nov 14 19:23:06 2000 debug/tstream.c:63 tstream_new
Tue Nov 14 19:23:06 2000 debug/xmlstream.c:103 head: <?xml version='1.0'?><stre
am:stream xmlns:stream='http://etherx.jabber.org/streams' id='3A11209A' xmlns='j
abber:component:accept' to='192.168.1.2' from='icq.payperfect.com' xmlns:etherx=
'http://etherx.jabber.org/' etherx:secret='7388f559019427ae1ee9ac57789e6fbf49840
c1d'>
Tue Nov 14 19:23:06 2000 debug/tstream.c:133 tstream_write_buffer
Tue Nov 14 19:23:06 2000 debug/ehandler.c:72 spun off connection attempt
Tue Nov 14 19:23:06 2000 debug/main.c:55 [main_thread_loop] entry
Tue Nov 14 19:23:06 2000 debug/tstream.c:212 tstream_main: startup
Tue Nov 14 19:23:06 2000 debug/xmlstream.c:228 xmlstream_main: startup
Tue Nov 14 19:23:06 2000 debug/tstream.c:335 tstream_connect: ADNS[192.168.1.2:
2222]
Tue Nov 14 19:23:06 2000 debug/tstream.c:492 tstream_socket 2222 192.168.1.2
Tue Nov 14 19:23:06 2000 debug/tstream.c:263 tstream write event 0
Tue Nov 14 19:23:06 2000 debug/tstream.c:285 tstream_write 271 blocks
Tue Nov 14 19:23:06 2000 debug/tstream.c:285 tstream_write 0 blocks
Tue Nov 14 19:23:06 2000 debug/tstream.c:247 tstream read event
Tue Nov 14 19:23:06 2000 debug/xmlstream.c:228 xmlstream_main: startup
Tue Nov 14 19:23:06 2000 debug/etherxs.c:61 got root tag from etherx!
Tue Nov 14 19:23:06 2000 debug/etherxs.c:70 shahashing: 3A11209Aicq-accept
Tue Nov 14 19:23:06 2000 debug/etherxs.c:72 output: 3A11209Aicq-accept:à^@^Ñicê
@m ðÏ
Tue Nov 14 19:23:06 2000 debug/etherxs.c:77 writing handshake: <handshake>7388f
559019427ae1ee9ac57789e6fbf49840c1d</handshake>
Tue Nov 14 19:23:06 2000 debug/tstream.c:133 tstream_write_buffer
Tue Nov 14 19:23:06 2000 debug/tstream.c:188 tstream_oob_flush
Tue Nov 14 19:23:06 2000 debug/tstream.c:263 tstream write event 0
Tue Nov 14 19:23:06 2000 debug/tstream.c:285 tstream_write 63 blocks
Tue Nov 14 19:23:06 2000 debug/tstream.c:285 tstream_write 0 blocks
Tue Nov 14 19:23:06 2000 debug/tstream.c:247 tstream read event
Tue Nov 14 19:23:06 2000 debug/xmlstream.c:228 xmlstream_main: startup
Tue Nov 14 19:23:06 2000 debug/etherxs.c:91 got node from etherx!
====================================================
Thanks,
I tried your suggestion, but on compiling, I got - undefined reference to `ehandler_new_ex'.
On searching through the source files, I found that actually ehandler is defined is ehandler.c in libetherx.
So, does that mean I need to change all ehandler_new to ehandler_new_ex and recompile libetherx.
Also, I got a too many arguments for function - I think it is from adding the 2222.
Have you tried this?
Vincent
On Tuesday 14 November 2000 09:35, you wrote:
> > huh, where to configure icq to use port 9000? I don't see where in the
> icq_trans.xml where I can configure this port 9000.
Quick patch for the icqtransport to connect to port 9000
Somewhere at the bottom of from_etherx.c you will see the following bit,
except the "jabber:component:accept" is called "jabber:server" and
"ehandler_new_ex" is simply called "ehandler_new". Also, the "2222" argument
to the ehandler_new function is not there.
{
static const char server_namespace[] = "jabber:component:accept";
log_debug(ZONE,"[from_etherx_start] kickoff here (host %s, namespace %s)",
g_config.hostname,server_namespace);
g_etherx = ehandler_new_ex(etherx_packet_handler,(char
*)(g_config.hostname),
(char *)server_namespace, 2222);
} /* end from_etherx_start */
Then, you change the code to match the above, use jabber:component:accept,
use ehandler_new_ex, and add the port you want icqtrans to connect to to the
ehandler_new_ex paramaters. In the above example, I am using port 2222, you
would use 9000 there.
When jabberd is running, run icqtrans -D and it should tell you it's
connecting to jabberd, if all goes well the last thing it will say (before it
waits for activity) is "xmlnode received!"
MAKE SURE that in icq_trans.xml you connect to the SERVICE JID for the icq
transport, not simply localhost or something. Read one of Keith's mails about
that.
The OFFICIAL way to tell the transport which port to connect to is to add a
<port>9000</port> section in the icq_trans.xml file, but then you also have
to patch the config.c file to understand this and pass it on to
ehandler_new_ex. I just hardcoded it because I am lazy :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20001114/05fabe29/attachment-0002.htm>
More information about the JDev
mailing list