Hi.
I am new to XMPP development. I am trying to use the XMPP4R lib to connect to
a local running XMPP server via the HTTPBinding::Client method. I can connect
using the normal client method, but I need to connect using http-client. The
error I am getting is "ThreadError: not owner" when I try and issue a connect
command.
I have read a few things about it, but that was back in 2007, and as far as I
can tell it was patched. Can someone please help me with this problem as I
have no idea how to get round it.
OS: Mac OSX
Ruby: ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
Here is the output in irb:
cl = Jabber::HTTPBinding::Client.new(Jabber::JID.new('[email protected]/home'))
=> #<Jabber::HTTPBinding::Client:0x1011e87f8 @pending_requests=0,
@ssl_capath=nil, @wakeup_thread=nil, @http_wait=20, @keepalive_interval=60,
@port=nil,
@features_sem=#<Jabber::Semaphore:0x1011e7c40@cond=#<ConditionVariable:0x1011e7b50>,
@lock=#<Mutex:0x1011e7ba0>, @tickets=0>,
@iqcbs=#<Jabber::CallbackList:0x1011e7fd8 @list=[]>,
@lock=#<Mutex:0x1011e83c0>, @tls=false, @parser_thread=nil,
@xmlcbs=#<Jabber::CallbackList:0x1011e8190 @list=[]>, @threadblocks=[],
@status=1, @send_buffer="", @features_timeout=10, @host=nil,
@messagecbs=#<Jabber::CallbackList:0x1011e80a0 @list=[]>, @fd=nil,
@http_content_type="text/xml; charset=utf-8", @streamid=nil,
@send_lock=#<Mutex:0x1011e7e48>, @jid=#<Jabber::JID:0x1011e8870
@domain="apple3.local", @resource="home", @node="admin">, @ssl_verifycb=nil,
@allow_tls="constant", @exception_block=nil, @last_send=Thu Jan 01 03:00:00
+0300 1970, @stanzacbs=#<Jabber::CallbackList:0x1011e8140 @list=[]>,
@streamns="jabber:client", @http_hold=1, @use_ssl=false,
@presencecbs=#<Jabber::CallbackList:0x1011e7f10 @list=[]>>
cl.connect("http://localhost:8080/http-bind/")
D, [2012-01-19T13:19:18.228644 #54367] DEBUG -- : HTTP REQUEST (0/):
<body rid='1793' wait='20' secure='true' to='apple3.local'
content='text/xml; charset=utf-8' hold='1'
xmlns='http://jabber.org/protocol/httpbind'/>
D, [2012-01-19T13:19:18.332838 #54367] DEBUG -- : HTTP RESPONSE (0/):
<body xmlns='http://jabber.org/protocol/httpbind'
sid='74450f61468410ae5cfb7cc0e96c13139cc73ea9' wait='20' requests='2'
inactivity='30' maxpause='120' polling='2' ver='1.8' from='apple3.local'
secure='true' authid='4206654696' xmlns:xmpp='urn:xmpp:xbosh'
xmlns:stream='http://etherx.jabber.org/streams'/>
ThreadError: not owner
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding/client.rb:159:in
`unlock'
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding/client.rb:159:in
`receive_elements_with_rid'
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding/client.rb:105:in
`connect'
from (irb):9
Thanks.
Kind Regards
Hamza Khan-Cheema_______________________________________________
Xmpp4r-devel mailing list
[email protected]
https://mail.gna.org/listinfo/xmpp4r-devel