IM Gateway 1.1.0 Beta

thanks for the beta. it seem’'s to run quite good.

sometimes i get following NPE (not in 1.0.2):

2007.06.02 12:18:32 org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.java :182) Error occured while processing packet:

java.lang.NullPointerException

at org.jivesoftware.openfire.gateway.BaseTransport.addNewRegistration(BaseTranspor t.java:1345)

at org.jivesoftware.openfire.gateway.BaseTransport.handleIQRegister(BaseTransport. java:706)

at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:457)

at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:163)

at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponent. process(InternalComponentManager.java:490)

at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:250)

at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)

at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:11 0)

at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:67 )

at org.jivesoftware.openfire.multiplex.MultiplexerPacketHandler.route(MultiplexerP acketHandler.java:164)

at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processRoute(Multiplexer StanzaHandler.java:89)

at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processUnknowPacket(Mult iplexerStanzaHandler.java:96)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:258)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:703)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:62)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:200)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :266)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:326)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Oops =) Thanks! Fixed in SVN,

Oh wow, I was just able to duplicate what you are seeing. Let me see what’'s causing it and fix. =)

Bother… ok, I figured out what was going on. I had a reversed logic flaw. Deejay, snowman, please try out the attached plugin, it should fix the issues you two were referring to. notz, the attached plugin also fixes the issue you were running into. Lemme know if it does indeed do the trick!
gateway.jar (729383 Bytes)

works for me (well, it logs me into MSN which is more than it did before!).

Will report back properly when I’'ve had chance to test it.

MSN custom status’'s look really odd.

Mine appear to be out of synch;

I set my status to from available to away, and my message in MSN says available, I set it to busy and MSN shows away etc. Very odd!

Before I do testing, one question, what client are you using? Spark? Psi? Something else?

Also, when you say “MSN shows away”, do you mean the icon in your XMPP client related to the MSN transport shows as away, or do you mean you are watching your account from another MSN account and you see it as away?

I’'m running an MSN test account along side Spark using the latest gateway.

The MSN client shows an incorrect status message for me (so it’‘ll show away when I’‘m away, but the corresponding message will be the one I’'d set previously

=/ Man, I just tested it with Psi and with Spark 2.5.3 and I can’‘t duplicate the behavior you are seeing. I’‘m watching from a real MSN client and a client attached via XMPP, and dancing through MSN statuses on a third account that’‘s connected via Spark and I’'m not seeing the behavior you are seeing at all. Now I have seen it take upwards of 5 seconds for changes to make it through. (like in my real MSN client I set my status message and it seems to sometimes take 5 seconds to arrive at the gateway or any other MSN client) What version of Spark? If not 2.5.3, mind giving 2.5.3 a quick test to see if it just happens to fix the behavior?

You can ignore that line btw =) (the dwr one)

For those who are watching this thread, I’‘m very excited about a wealth of updates I did today so I’‘m posting another build of the beta attached to this post. (I’'ll get Matt to update the beta plugins site if I can ever get a hold of him) Either way, some of the bigger updates are:

OSCAR (AIMICQ) Improvements:

  • now get notified when a buddy adds you

  • ICQ auth steps are handled now

  • ICQ statues are now supported

Web Interface:

  • Added “search by user(jid) and legacy username” feature

IRC:

  • Fixed some timing issues that were causing some misc errors
    gateway.jar (729784 Bytes)

I’'m using Spark 2.5.3. It would appear just to be massively laggy.

It takes in the region of 30 seconds to change the personal message (whereas the presence info changes immediately).

The correct personal message is sent by Spark immediately. If you make 2 personal message changes in a short period of time then the first is applied as soon as the second is made (so that’'s why I thought it was 1 message out).

So, if this is an MSN quirk a rather horrible fix would be to send the change of message twice and I figure that will make it appear immediately

Message was edited by: DeeJay

And another thing (sorry) - when I log out of Spark (even with a reason) that information doesn’'t get as far as MSN. So, currently MSN sees me as offline with a personal message of available.

Would it be better to either:

  1. Change the message when a user goes offline (to either nothing or their offline message)

or

  1. Don’'t tell MSN about regular message statuses (such as available, away, free to chat etc) as that information is already known due to their presence info)

yeah, my error log is now empty

Hold tight on the MSN delayed status message issue. It’'s possible MSN is just being slow. I was seeing the same lag coming from real MSN clients last night. It might just be having a “bad weekend” so to speak.

Unfortunately, I can’‘t start second guessing the status messages. Someone -could- legitimately want their status message to be “Away”, despite how useless that is. (i’'ve met a couple and grumbled at them)

That said … interesting that they’'re sticking around. I should be able to get around that with a simple “remove my status” before logout. GATE-230

Whilst I agree it’‘s probably MSN being rubbish - I don’'t understand why setting it twice consecutively (even to the same message) makes it effective immediately. Any chance of having the gateway just do that instead of hoping MSN is having a good day?

=) I’‘m not going to do things like that. The last thing I need is for MSN to decide something I’'m doing is abusive and start working on blocking us.

Okay. I’'ll see how it goes when MSN is behaving.

At the moment, a 1 minute delay just makes it look like the gateway is broken. If it does continue - any chance of an option in the config to turn off status messages?

I’'ll also probably run the risk of MSN getting upset, and add build a version with the 2nd status message set.

thanks,

D

Thing is, if -you- cause MSN to be upset, it’‘s not going to affect just you, it’‘s going to cause MSN to do something to screw with their protocol so no one can use it. So I would recommend not screwing with it. If it’'s bothering you, I would recommend disabling the lines that say “setPersonalMessage” in MSNSession.java for now.

Also, I haven’'t been able to duplicate it today. I take it you are still seeing it?

I have an idea, if you want to mess with the code, try moving setPersonalMessage to before the status update (in updateStatus) and see if that just happens to do the trick. I have a theory that maybe it would be cleaner if I were doing it in the reversed order. Unfortunately, since I can’‘t duplicate it today, I can’'t test if my idea would do the trick. =(

Beyond that, sniffing the network traffic might give us an idea as to what’'s going on.