PacketFilter problem

I’'ve used Smack in the following way:

The Java instance sends a message to a person on his list.

Only that person is allowed to send messages to the java instance.

This is done by:

PacketFilter filter = new AndFilter(new PacketTypeFilter(Message.class),

new FromContainsFilter(p.getContactId()));

PacketListener myListener = this;

xmppc.addPacketListener(myListener, filter);

The void processPacket(Packet) function is called twice each time that person sends a message to the java instance.

I thought it could be the AndFilter that processes the packet for each filter, but when I use only one filter, the function is called twice too.

Nevermind this.

I’'ve started up two threads, each instantiates a class that implements the PacketListener.

When someone sends a message to the java instance, all classes implementing the PacketListener are triggered by this…

Moderator: You may delete this thread as it is useless for anybody