ICQ server port number setting ignored?

Hi, I have problems connecting to the default ICQ port 5900, so I tried to create and set the

plugin.gateway.icq.connectport

property, but no luck, the gateway still tries the 5900. What do I do wrong, or how can I make the gateway use the desired port?

Cheers,

Filip

That functionality is not, how shall we say… implemented. ;D

Perhaps I should indicate that in the wiki. I will do that in a moment.

Thanks for the info, and thanks for the nice work! Do you think that the current version in the SVN is usable? I’‘d like to try this out so I’'d change the port number in the sources…

Thanks,

Filip

Well, this was not hard to fix, even though I’'m a java noob See the attached patch (the important one is the OSCARSession.java patch, the other one just uncomments an existing block that I found interesting).

Congratulations to the whole team for the nice build framework, I got it all up and running (including the mod) in minutes!

Cheers,

Filip

P.S. is there no way of attaching a real file to messages in this forum? I had to copy-paste the patch here…

Index: src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java

===================================================================

— src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java (revision 5915)

+++ src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java (working copy)

@@ -29,6 +29,7 @@

import net.kano.joscar.ssiitem.BuddyItem;

import net.kano.joscar.ssiitem.GroupItem;

import org.jivesoftware.util.Log;

+import org.jivesoftware.util.JiveGlobals;

import org.jivesoftware.wildfire.gateway.*;

import org.jivesoftware.wildfire.user.UserNotFoundException;

import org.jivesoftware.wildfire.roster.RosterItem;

@@ -79,7 +80,12 @@

public void logIn(PresenceType presenceType, String verboseStatus) {

if (!isLoggedIn()) {

setLoginStatus(TransportLoginStatus.LOGGING_IN);

  •        loginConn = new LoginConnection(new ConnDescriptor("login.oscar.aol.com", 5190), this);
    
  •        loginConn = new LoginConnection(new ConnDescriptor(
    
  •                JiveGlobals.getProperty(
    
  •                    "plugin.gateway.icq.connecthost", "login.oscar.aol.com"),
    
  •                JiveGlobals.getIntProperty(
    
  •                    "plugin.gateway.icq.connectport", 5190)),
    
  •                this);
    

loginConn.connect();

this.presenceType = presenceType;

Index: src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/LoginConnection.java

===================================================================

— src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/LoginConnection.java (revision 5915)

+++ src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/LoginConnection.java (working copy)

@@ -42,14 +42,13 @@

request(new KeyRequest(oscarSession.getRegistration().getUsername()));

}

else if (e.getNewState() == ClientFlapConn.STATE_FAILED) {

  •        //TODO: Do we need to catch these?
    

-// Message m = new Message();

-// m.setType(Message.Type.error);

-// m.setFrom(this.getMainSession().getTransport().getJID());

-// m.setTo(this.getMainSession().getJIDWithHighestPriority());

-// m.setBody("Connection failed: " + e.getReason());

-// this.getMainSession().getTransport().sendPacket(m);

-// this.getMainSession().logOut();

  •        Message m = new Message();
    
  •        m.setType(Message.Type.error);
    
  •        m.setFrom(this.getMainSession().getTransport().getJID());
    
  •        m.setTo(this.getMainSession().getJIDWithHighestPriority());
    
  •        m.setBody("Connection failed: " + e.getReason());
    
  •        this.getMainSession().getTransport().sendPacket(m);
    
  •        this.getMainSession().logOut();
    

}

else if (e.getNewState() == ClientFlapConn.STATE_NOT_CONNECTED) {

//TODO: Do we need to catch these?

Please consider applying the patch to the trunk.

Done =) Thanks for the patch! (I tweaked it a little to account for both aol and icq, as well as added similar functionality across the board)

Thanks!! So far it works great, including contact list, so I’‘m happy What I noticed does not work yet is icq authorization stuff, but I understand this is beta 4. If I have more patches, I’'ll post them here (or is there some other place more convenient for you?)

Cheers,

Filip

Which ICQ authorization stuff are you referring to? When someone adds you to their list? or adding others to your list? Or?

And yes, please post any patches here. =) (ideally other threads) Or you can send them directly to me at jadestorm@nc.rr.com.

Note that I am the primary maintainer of Java-JML, so I can apply patches to it directly if they come up. The other libraries I’‘m still willing to patch but ideally the patch should also be submitted upstream to the main devs (I’'ll do that for you if you want)

I did not see “(re)request authorization”, “authorize” etc in the contacts’’ context menu, so I had to fire up the official ICQ client to handle this. I noticed because some of the contacts were in fact in the “awaiting authorization” status, but they appeared offline. But, it might be Miranda that causes this, I did not check how that works with Psi. BTW the gateway works nice with Miranda, just the messages (like logon failure) that the gateway sends to the transport contact are ignored (I saw that they’‘re displayed in Psi, so this is probably Miranda’'s fault).

What context menu are you referring to? Miranda? Psi? ICQ’'s real clients?

Or are you referring to not seeing folk awaiting authorization at all?

Miranda’‘s. In Miranda, I saw the contacts that were in the “awaiting authorization” status (i.e. I was waiting for them to authorize me) as offline, compared to the official ICQ client, where there are 3 main statuses of contacts (online, offline, awaiting authorization). I’‘m gonna investigate this a bit further, as I still have 1 such contact, whom I’'ll meet personally tomorrow

Ok! Let me know what you find out! Thanks!

jadestorm wrote:

Ok! Let me know what you find out! Thanks!

Well, now that the CPU load is OK I tried to test this stuff. I don’‘t see any authorization menus in Miranda (that’‘s Miranda’‘s problem I guess), so I tried with Psi. Psi offers “re-send authorization to contact”, “re-request authorization from contact”, so I clicked both of these and nothing seems to happen at the contact’'s ICQ client.

Debug Log:

2006.11.14 14:33:16 Received presence packet:

Information Log:

2006.11.13 12:29:30 Starting transport service: icq

2006.11.13 12:29:41 OSCAR connection to 64.12.26.165:5998

2006.11.13 12:30:45 OSCAR connection to 64.12.26.164:5998

2006.11.13 14:52:20 OSCAR connection to 64.12.26.166:5998

2006.11.14 08:09:18 OSCAR connection to 64.12.26.165:5998

2006.11.14 08:18:46 OSCAR connection to 64.12.26.165:5998

2006.11.14 09:15:28 OSCAR connection to 64.12.26.164:5998

2006.11.14 09:15:38 OSCAR connection to 64.12.26.165:5998

2006.11.14 14:19:37 OSCAR connection to 64.12.26.166:5998

2006.11.14 14:22:37 OSCAR connection to 64.12.26.165:5998

2006.11.14 14:23:46 OSCAR connection to 64.12.26.165:5998

2006.11.14 14:24:58 OSCAR connection to 64.12.26.166:5998

2006.11.14 14:25:17 OSCAR connection to 64.12.26.164:5998

2006.11.14 14:32:04 OSCAR connection to 64.12.26.166:

Other (warning, error) logs are empty. My guess is that the authorization request does not get through to the ICQ server. However, I can both send and receive messages from the contact, regardless of its offline status.

Cheers,

Filip

GATE-127