1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-12 15:22:05 +01:00
Commit graph

3032 commits

Author SHA1 Message Date
Florian Schmaus
e6787b21ce Merge pull request #122 from andrisasuke/fix-enable-push-formtype
Fix enable push notification IQ form type
2017-04-03 15:07:29 +02:00
andri.khrisharyadi
c8b4df4f84 Fix EnablePushNotificationsIQ wrong form type
Should be submit instead of form
Fixes SMACK-752
2017-04-03 18:59:14 +07:00
8a8c01a4e5 Fix AbstractError.getDescriptiveText() 2017-03-20 16:57:06 +01:00
Fernando Martinez Herrera
4fb1449077 Fix AbstractJidTypeFilter.accept() 2017-03-20 16:56:12 +01:00
Florian Schmaus
76adf22ba1 Add missing break statement to deleteViaServiceAdministration()
in IntTestUtil.
2017-03-18 19:19:48 +01:00
Florian Schmaus
1e0481b355 Add PubSubManager.getOrCreateLeafNode(String) 2017-03-18 18:31:06 +01:00
Florian Schmaus
3ce5973915 Also add stanzas to unacknowledgedStanzas while shutting down
This caused the WaitForClosingStreamElementTest integration test to
fail, because the last presences stanzas, which are send after done()
in the writer thread would return true, are not added to the
unacknowledgedStanzas queue.

The result was:

SEVERE: WaitForClosingStreamElementTest.waitForClosingStreamElementTest (LowLevel): Failed
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.invokeLowLevel(SmackIntegrationTestFramework.java:466)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runTests(SmackIntegrationTestFramework.java:375)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.run(SmackIntegrationTestFramework.java:165)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.main(SmackIntegrationTestFramework.java:84)
Caused by: java.lang.AssertionError: Sync poing yielded failure exception
        at org.jivesoftware.smack.WaitForClosingStreamElementTest.waitForClosingStreamElementTest(WaitForClosingStreamElementTest.java:46)
        ... 8 more
Caused by: org.jivesoftware.smack.sm.StreamManagementException$StreamManagementCounterError: There was an error regarding the Stream Mangement counters. Server reported 3 handled stanzas, which means that the 3 recently send stanzas by client are now acked by the server. But Smack had only 1 to acknowledge. The stanza id of the last acked outstanding stanza is FqL1X-144
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.processHandledCount(XMPPTCPConnection.java:1847)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$2600(XMPPTCPConnection.java:149)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1176)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:980)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:996)
        at java.lang.Thread.run(Thread.java:745)
2017-03-18 17:49:38 +01:00
Florian Schmaus
3d1cf61caf Add comment to ScramMechanism.getChannelBindingName() 2017-03-18 17:49:38 +01:00
Florian Schmaus
140e8faae3 Add Smack logo
thanks to Muhammad Bilal Siddiq for providing these.
2017-03-18 17:49:38 +01:00
Florian Schmaus
43715460c6 Fix SASL SCRAM-SHA-1(-PLUS) priority
Fixes SMACK-749.

Thanks to Grigory Fedorov for reporting this and to Kim Alvefur for
helping to diagnose the issue.
2017-03-18 17:49:38 +01:00
Florian Schmaus
b6f7d019c7 Use SASLMechanism.toString() in getRegisterdSASLMechanisms()
of SASLAuthentication.
2017-03-18 17:49:38 +01:00
Florian Schmaus
762939068b Add javadoc for SASLMechanism.getPriority() 2017-03-18 17:49:38 +01:00
Florian Schmaus
de783dce73 Add SASLMechanism.toString() 2017-03-18 17:49:38 +01:00
Florian Schmaus
dcac9531e7 Fix SASLAuthentication.getRegisteredSASLMechanisms
by using a LinkedHashMap which is insertion-ordered as compared to
HashMap.
2017-03-18 17:48:52 +01:00
Florian Schmaus
3640339073 Fix ConnectionConfiguration.getEnabledSaslMechanisms()
in case enabledSaslMechanisms is null, because then unmodifiableSet()
will throw an NPE.

Thanks to Nándor Holozsnyák for reporting.
2017-03-15 21:25:37 +01:00
Florian Schmaus
0a6843f41f Make StreamNegotiator weakly reference XMPPConnection
by extending Manager.

Because FileTransferNegotiator will hold a strong reference to the
StreamNegotiators, which will eventually prevent XMPPConnection from
being GC'ed if no weak references in StreamNegotiator are used.

Thanks to Werner Glanzer for pointing this out.
2017-03-15 21:17:49 +01:00
Florian Schmaus
a592a12229 Make InBandBytestreamManager use weak references to XMPPConnection 2017-03-15 15:07:41 +01:00
Florian Schmaus
525feaa161 Add SynchronizationPoint.getFailureException() 2017-03-13 07:37:40 +01:00
Florian Schmaus
fc9748b567 Smack 4.2.1-SNAPSHOT 2017-03-10 23:26:53 +01:00
Florian Schmaus
b9b8b1a780 Smack 4.2.0 2017-03-10 21:39:01 +01:00
Florian Schmaus
b436ab897d Travis CI: Remove MaxPermSize=512M
since we are using only Java8 now, where this option no longer exists.
2017-03-10 17:55:07 +01:00
Florian Schmaus
1cc9cec677 Use thread local variables for (Secure)Randoms 2017-03-10 17:55:07 +01:00
Florian Schmaus
09b6608a3a Fix and improve the HTTP File Upload implementation
Fix a few resource leaks. Improve the API and add an integration
test. Also add compability layer for XEP-0363: HTTP File Upload 0.2.

SMACK-747
2017-03-10 17:54:29 +01:00
Grigory Fedorov
72d4c8b611 Add support for XEP-0363: HTTP File Upload.
Fixes SMACK-747
2017-03-10 17:47:13 +01:00
Florian Schmaus
a8c6de6b98 Improve MamManager javadoc 2017-03-10 17:47:13 +01:00
Daniel Hintze
1c5c8e32d9 Fixing typo + method name in messaging documentation 2017-03-10 17:47:13 +01:00
Florian Schmaus
e141de9aa4 Fix possible NPE in roster push listener
Daniele Ricci reporting the following NPE using Smack 4.1.9

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.indexOf(int)' on a null object reference
       at org.jxmpp.util.XmppStringUtils.parseBareJid(XmppStringUtils.java:124)
       at org.jivesoftware.smack.roster.Roster$RosterPushListener.handleIQRequest(Roster.java:1416)
       at org.jivesoftware.smack.AbstractXMPPConnection$2.run(AbstractXMPPConnection.java:1061)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
       at java.lang.Thread.run(Thread.java:818)

This is possibly caused by a service sending roster pushes for unbound
connections, i.e. where getUsers() returns 'null'. We now log such
situations instead throwing an NPE.
2017-03-10 17:47:13 +01:00
Florian Schmaus
6b7a8142c9 Merge pull request #110 from vfite/BOSH-ERROR
Add parsing non stream errors for BOSH
2017-02-27 13:34:02 +01:00
vfite
fb82e04109 add parsing non stream errors for BOSH 2017-02-27 14:14:04 +02:00
Florian Schmaus
ccd386ebbc Merge pull request #106 from annovanvliet/fixBuild
Make Smack buildable under windows.
2017-02-27 12:04:59 +01:00
Anno van Vliet
382d519766 Make Smack buildable under windows.
Specify UTF-8 as character set. Added some symbolic links to smack-integration-test for consistency sake.
2017-02-26 18:13:10 +01:00
Florian Schmaus
32fd52ea8e Sync MAM API with PubSub API: One MamManager per MAM archive address 2017-02-24 19:33:11 +01:00
Florian Schmaus
00005d87be Improve MamTest
- Use DummyConnection
- Use InitExtensions
2017-02-24 19:32:46 +01:00
Florian Schmaus
1c30881557 build.gradle: Add 'testRuntime' configuration to artifacts
To complete the 'testRuntime' artifact configuration.
2017-02-24 19:27:09 +01:00
Anno van Vliet
c13cddd91a Enable querying MAM by address and node.
Enhance the API to query archives for example from a room or a pubsub
node.
2017-02-24 08:11:57 +01:00
Florian Schmaus
68cecf2eee Fix the MUC join presence response filter
Error responses do not contain the '110' status. Therefore we have to
filter for them via the stanza id and the from address.
2017-02-20 14:22:19 +01:00
Florian Schmaus
6cfdf2bc6f Use CopyOnWriteArraySet for pingFailedListeners
To prevent

java.util.ConcurrentModificationException
  at java.util.HashMap$HashIterator.nextEntry(HashMap.java:788)
  at java.util.HashMap$KeyIterator.next(HashMap.java:815)
  at org.jivesoftware.smackx.ping.PingManager.pingMyServer(PingManager.java:252)
  at org.kontalk.service.msgcenter.MessageCenterService$3.run(MessageCenterService.java:1114)
  at java.lang.Thread.run(Thread.java:818)

Thanks to Daniele Ricci for reporting this.
2017-02-15 20:16:40 +01:00
Florian Schmaus
bb3eeb9af0 Travis CI: Don't build with Oracle JDK 7
since the bump of Error Prone to 2.0.15, the JDK 7 javac is no longer
supported. Note that we still generate version 51 (Java 7) class
files.
2017-02-11 20:40:15 +01:00
Florian Schmaus
4d58fc136b Smack 4.2.0-rc4-SNAPSHOT 2017-02-11 20:39:54 +01:00
Florian Schmaus
5f7be5abf3 Smack 4.2.0-rc3 2017-02-11 16:59:18 +01:00
Florian Schmaus
4c646436a5 Bump "Error Prone" to 2.0.15
and fix a few things :)
2017-02-11 16:16:41 +01:00
Florian Schmaus
ef0af66b21 Enfore spaces for indentation
Although I'm in the tabs camp, Smack uses mostly spaces. Therefore it
is the logical choice for the indentation style.
2017-02-07 22:10:10 +01:00
Florian Schmaus
ffe9397e66 Fix SASLMechanism.compareTo(SASLMechanism)
Thanks to Aleksander Melnichnikov for pointing this out.
2017-02-02 16:08:37 +01:00
Florian Schmaus
bf1e07e672 Fix chat2.ChatManager's message filter
Thanks to Andras Csete for pointing this out.
2017-02-02 12:46:50 +01:00
Florian Schmaus
684d33b773 Fix Carbon Listener setup
We can't always setup the carbons listener in the constructor of the
manager, as the our local XMPP address may not be available yet. So
setup the carbons listener on a connection listener *and* in the
constructor.
2017-02-01 10:59:44 +01:00
Florian Schmaus
872b254db5 sendStanzaWithResponseCallback: Ensure exactly one callback is called 2017-01-30 21:01:56 +01:00
Florian Schmaus
46e8866440 Improve log message of RosterResultListener 2017-01-30 17:09:30 +01:00
Florian Schmaus
b142060f9e sendStanzaWithResponseCallback(): remove listener right away
I'm not sure why i've put the removeAsyncStanzaListener() call into
the finally block. If callback.processStanza(Stanza) takes a long
time (or even blocks), then it would appear to the "no response"
handling Runnable as if there was no response, when in fact there was
one.
2017-01-30 17:09:30 +01:00
Florian Schmaus
187fe37cd7 Fix MucEnterConfiguration.Builder.withPresence(Presence) throw ISE
when presence is of type available. This inverts the logic to fix
this.
2017-01-30 17:09:29 +01:00
Florian Schmaus
85fcb55bd9 Fix roster handling of outgoing 'unavailable' presence
make sure that the 'to' attribute is not set, as otherwhise the
listener would also be invoked e.g. when the user leaves a MUC.
2017-01-29 11:12:30 +01:00