Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 93110 invoked from network); 11 Jun 2009 05:53:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jun 2009 05:53:58 -0000 Received: (qmail 73013 invoked by uid 500); 11 Jun 2009 05:54:10 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 72967 invoked by uid 500); 11 Jun 2009 05:54:10 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 72951 invoked by uid 99); 11 Jun 2009 05:54:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 05:54:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 05:54:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 02EF1238889C; Thu, 11 Jun 2009 05:53:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r783640 - in /camel/branches/camel-1.x: ./ components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java Date: Thu, 11 Jun 2009 05:53:40 -0000 To: commits@camel.apache.org From: davsclaus@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090611055341.02EF1238889C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davsclaus Date: Thu Jun 11 05:53:40 2009 New Revision: 783640 URL: http://svn.apache.org/viewvc?rev=783640&view=rev Log: Merged revisions 783639 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk ........ r783639 | davsclaus | 2009-06-11 07:51:15 +0200 (Thu, 11 Jun 2009) | 1 line CAMEL-1633: must add packet listener before creating muc. ........ Modified: camel/branches/camel-1.x/ (props changed) camel/branches/camel-1.x/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java Propchange: camel/branches/camel-1.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jun 11 05:53:40 2009 @@ -1 +1 @@ -/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781 923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783363 +/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781 923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783363,783639 Propchange: camel/branches/camel-1.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-1.x/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java?rev=783640&r1=783639&r2=783640&view=diff ============================================================================== --- camel/branches/camel-1.x/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java (original) +++ camel/branches/camel-1.x/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java Thu Jun 11 05:53:40 2009 @@ -60,6 +60,12 @@ LOG.info("Open private chat to: " + privateChat.getParticipant()); } } else { + // add the presence packet listener to the connection so we only get packets that concers us + // we must add the listener before creating the muc + final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant()); + final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter); + connection.addPacketListener(this, packetFilter); + muc = new MultiUserChat(connection, endpoint.resolveRoom(connection)); muc.addMessageListener(this); DiscussionHistory history = new DiscussionHistory(); @@ -69,11 +75,6 @@ if (LOG.isInfoEnabled()) { LOG.info("Joined room: " + muc.getRoom() + " as: " + endpoint.getNickname()); } - - // add the presence packet listener to the connection so we only get packets that concers us - final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant()); - final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter); - connection.addPacketListener(this, packetFilter); } super.doStart();