powered by Jive Software

Help! urgent! please! anybody! come on!

this is connected to the problem before so i found the bug…

after i removed the entry…

i wait 2 seconds and then prints the presence of the deleted user.

it should have printed ‘‘null’’ but it prints available.

so i guess maybe the removeEntry doenst remove the presence correctly.

because after i remove the entry i no longer see him in my roster and that’'w how it should be…

but the presence remains and it’'s not null.

Gil,

Please, do not post the same message multiple times in different posts.

Are you using the latest Smack version? If you are not using the latest version, please consider upgrading because we fixed some issues with the roster.

Since you can’'t open a debugger window, you can add a packet listener for all the packets that you receive and create a new JSP page that will show all the received packets. I suspect that for some reason Smack is not receiving the unavailable presence from the server or there is a delay greater than 2 seconds.

If you can ensure that Smack is receiving the unavailable presence and that you are still getting the user’'s presence, then I will ask you to paste the received packets from the server in order to reproduce the problem.

Regards,

– Gato

i upgraded the jars and it still not ok.

the problem still exists…

i dont know y u think i cant debug…

i can.

but i dont know exactly what to paste u…

so i pasted the packets arrive from the server

when i delete a user… and then add him again…


sent: freinds


recv:


<iq from=’‘gilsha@jabber.org/balcony’’ id=’‘V5Jh5-6’’ to=’‘gilsha@jabber.org/balcony’’ type=’‘result’’/>

<iq type=’‘set’’><query xmlns=’‘jabber:iq:roster’’><item ask=’‘subscribe’’ jid=’‘gilsha2@jabber.org’’ name=’‘gilsha2@jabber.org’’ subscription=’‘none’’>

freinds

<presence from=’‘gilsha2@jabber.org’’ to=’‘gilsha@jabber.org’’ type=’‘subscribed’’/>

<iq type=’‘set’’><query xmlns=’‘jabber:iq:roster’’><item jid=’‘gilsha2@jabber.org’’ name=’‘gilsha2@jabber.org’’ subscription=’‘to’’>

freinds<presence from=’‘gilsha2@jabber.org/Home’’ to=’‘gilsha@jabber.org’’>away1<x from=’‘gilsha2@jabber.org/Home’’ stamp=’‘20040421T17:39:21’’ xmlns=’‘jabber:x:delay’’/>

<presence from=’‘gilsha2@jabber.org’’ to=’‘gilsha@jabber.org’’ type=’‘subscribe’’/>

<iq type=’‘set’’><query xmlns=’‘jabber:iq:roster’’><item jid=’‘gilsha2@jabber.org’’ name=’‘gilsha2@jabber.org’’ subscription=’‘both’’>freinds


when i delete the user


recv: <iq type=’‘set’’><query xmlns=’‘jabber:iq:roster’’><item jid=’‘gilsha2@jabber.org’’ name=’‘gilsha2@jabber.org’’ subscription=’‘remove’’>freinds

<iq from=’‘gilsha@jabber.org/balcony’’ id=’‘V5Jh5-12’’ to=’‘gilsha@jabber.org/balcony’’ type=’‘result’’/>


when i add again the user


<iq type=’‘set’’><query xmlns=’‘jabber:iq:roster’’><item jid=’‘gilsha2@jabber.org’’ name=’‘gilsha2@jabber.org’’ subscription=’‘none’’>freinds

<iq from=’‘gilsha@jabber.org/balcony’’ id=’‘V5Jh5-14’’ to=’‘gilsha@jabber.org/balcony’’ type=’‘result’’/>

<iq type=’‘set’’><query xmlns=’‘jabber:iq:roster’’><item ask=’‘subscribe’’ jid=’‘gilsha2@jabber.org’’ name=’‘gilsha2@jabber.org’’ subscription=’‘none’’>

freinds

what drives me crazy is that

i do this…

roster.removeEntry(roster.getEntry(nodeInfo));

//Update the roster list

try {

Thread.sleep(2000);

}

catch (InterruptedException ie) {

}

//Update the roster

setRoster();

System.out.println(roster.getPresence(nodeInfo));


and on my roster list i dont see the deleted user…

but it prints that the presence of this deleted user

is available:online

Thanks for the additional details about the problem. I understand what you’‘re trying to do and agree this is a bug. I’‘m checking in a fix that will be in tomorrow’'s daily build. Basically, on line 672 of Roster.java I inserted:

// Removing the user from the roster, so remove any presence information
// about them.
String key = StringUtils.parseName(item.getUser()) + "@" +
        StringUtils.parseServer(item.getUser());
presenceMap.remove(key);

Please let me know if this fix doesn’'t work for you.

Regards,

Matt

what with the fix?

its ok!!!

it works!! thank u…

now lets hope that the fix doesnt afect something else…

but thanks!!