The final problem it resolves is this: Currently when you uncheck the “broadcast presence for” for a certain role (say visitor), their join presence is correctly supressed, but their unavailable presence is not when they leave the room. This is because Openfire (correctly) sets their role to none upon departure.
Unfortunately this is done right before the check to see if their presence should be broadcast, resulting in the presence always being sent to the entire room, despite them previously being a visitor.
To solve this, I created a shouldBroadcastPresence function, and check to see if the user’s original presence should be broadcast. If not, the new presence (with role=none) is only sent to the user, and not the entire room. This also fixes the issue listed above where unavailable presence packets were being sent twice upon user departure.
If someone would like to review and possibly integrate this patch, that would be excellent:
Is it ok to attach the same patch for the two tickets, Daryl? I wonder how this will affect SVN, though probably it will just apply it twise But i think patch should be split into 3 parts and one more ticket should be filed for the issue descibed in this thread.
Yes. I think it is better if you do the splitting. Split it to 3 parts and i will create the missing ticket for the third one. Then we will change the attachments in the bug tracker.
OF-64 Also, you may want/need to sign a contributors agreement and send/fax it to Jive. But Benjamin has to update pdfs wit the new Jive’s office address first http://www.igniterealtime.org/community/docs/DOC-1733
So I’ve attempted to split this out, but unfortunately two of the changes conflict with each other (OF-64 completely replaces some of the lines that would have been split out for OF-48), I’m not quite sure how to handle that. Anyway, here are two patches, I tested applying them in different order against 3.6.4, and it appears that patch is smart enough to figure it out.
Maybe we should just have OF-48 reference OF-64 and close it as a duplicate since the patch for OF-64 fixes both issues?
I’ve contributed a few patches before without signing anything, but if you need me to do so I can take care of that. I’m also doing some fairly extensive performance modifications relating to concurrency and BOSH (along with updating the connection manager to support the newest BOSH version) that aren’t quite ready for integration yet. We use MUC pretty extensively (35,000 concurrent users all in MUC with ~250 users per room), and some of the performance tweaks have really helped out in that area, so I’d like to contribute them eventually.
Let me know if you need anything else from me regarding these issues! of-55.diff.zip (538 Bytes) of-64.diff.zip (1583 Bytes)
Is there an easy way to apply these patches using the non-svn version that’s currently on the downloads page? I’ve tried to run my own compiled from SVN version but it’s missing some stuff I suppose and doesn’t want to function properly.
Is there a document out there anywhere detailing how to build/run from svn? I’d like to patch some of these issues out but am having trouble running the compiled version from SVN.
RapidSVN:
Repository > Checkout
URL http://svn.igniterealtime.org/svn/repos/openfire/trunk
Destination Directory D:\My Documents\JiveSoftware\Openfire
Add to bookmark, Recursive
OK
Close RapidSVN
Open
Double click the bookmark
button - Update selected
OK
Openfire + Netbeans (create project before creating Openfire dir - rename it temporary)
create new Java project with existing source - set folder and project name, dont press Next yet
then rename Openfire_renamed to Openfire
copy build.xml from build dir to parent
edit build.xml in parent, change basedir=“…” to basedir=“”
add after
go to Netbeans and press next
press Add folder, choose src folder, Finish
in Netbeans right-click Openfire project, choose Properties
click Libraries - Add JAR/Folder
select /Openfire/build/lib dir (Absolute path) - OK
now Clean and Build
to launch - /target/build/bin/openfire.bat
to be able to run openfire.bat need to add System variable JAVA_HOME with value C:\Program Files\Java\jdk_version (no trailing slash) (My computer > Advanced > Environment variables)
I use RapidSVN, but you can use SVN app of your choice, like TortoiseSVN. And you can also find some hints in the http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/source-b uild.html