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

2762 commits

Author SHA1 Message Date
Florian Schmaus
a9741a8b10 Use weak map for 'managers' in Socks5BytestreamManager
Fixes memory leak and SMACK-678.
2015-06-29 17:07:42 +02:00
Florian Schmaus
ebcbdb75cd Smack 4.1.2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJVjpgTXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41g0IH/3dJedDe6D8BySl4YVoFkQEk
 Ax6T9oguTHN4o+6wnIjZUMBqycxKbwCppwE8ydrsarpxBicehwLzgaegxqVOtqM/
 /7ZNzMiASxzeSCOQpR6dxNYGZp/buY3yaL4hweVh8V+vRVxzk/dXBpl6Syba+G1N
 ytpCfeC6bGd+Gf5aQ9SA8rPz3ZP99twFNuKYwZGkC8/ePtieT8YthKwwnaIlCuFL
 BZbhgR24W5pDtaCocTBUnI2wTqv2WsEx6+6LNEHsg2pbAwf2hYw12LPk0krvZOOV
 PSK/Jtq5qdXrq/vNudvfuVmk5KnhS8BO/WIY+8+EsYBFfP0W7ajZl69KGOxobNQ=
 =dg39
 -----END PGP SIGNATURE-----

Merge tag '4.1.2'

Smack 4.1.2

Conflicts:
	version.gradle
2015-06-27 15:07:04 +02:00
Florian Schmaus
7d97653926 Smack 4.1.3-SNAPSHOT 2015-06-27 15:04:26 +02:00
Florian Schmaus
54719a43e2 Smack 4.1.2 2015-06-27 14:33:14 +02:00
Florian Schmaus
65788389ea Reset ReconnectionManager's 'attempts' to 0
on successful reconnects. Fixes SMACK-668.
2015-06-27 14:25:19 +02:00
Florian Schmaus
a997283304 Make AbstractXMPPConnection.getConfiguration public 2015-06-26 14:04:46 +02:00
Florian Schmaus
d54dafc499 Don't return if securityMode is 'disabled'
in afterFeaturesReceived. As this will cause
maybeCompressFeaturesReceived.reportSuccess() never to be called if the
server announces 'starttls' but security mode is set to 'disabled' and
if 'compression' is also announced.

Fixes SMACK-678.
2015-06-25 11:07:25 +02:00
Florian Schmaus
4b0767ba9a Fix concurrency exception in ServerPingWithAlarmManager
Fixes SMACK-676.
2015-06-23 16:00:18 +02:00
Tibo-lg
3ff1ab6e1f Update hoxt documentation to use List instead of Set for headers. 2015-06-22 19:07:34 +02:00
Tibo-lg
e20c17050e Change append to optAppend for headers and data to avoid NullPointerException 2015-06-22 19:07:34 +02:00
Hugues Bruant
f24ef7dda9 XmppHostnameVerifier: check subject CommonName 2015-06-22 19:06:23 +02:00
Florian Schmaus
0cbbedd2f4 Bump jxmpp to 0.5.0-alpha6 2015-06-16 10:08:18 +02:00
Florian Schmaus
c9eb6323c0 Fix a race on graceful disconnect
A sequence of connect(), disconnect(), and connect() could cause the
connection to get disconnected again by the old reader thread, which was
blocking on disconnect because a closing stream tag was read. If the
second connect() was processed before the disconnect(), then the
connectin would get disconnected right after the second connect().

This showed up as a "strange" sequence of stanzas in the XMPP servers
log. Note that the stanza ID of the unavailable presence has a lower
number then the previous stanzas:

Jun 11 23:11:11 c2s18c2370      debug   Resource bound: smack-inttest-two-93t70@geekplace.eu/two-93t70
Jun 11 23:11:11 c2s18c2370      debug   Received[c2s]: <iq id='qn03S-26' type='get'>
Jun 11 23:11:11 c2s18c2370      debug   Received[c2s]: <presence id='qn03S-27'>
Jun 11 23:11:11 c2s18c2370      debug   Received[c2s]: <presence id='qn03S-23' type='unavailable'>
Jun 11 23:11:11 c2s18c2370      debug   Received </stream:stream>

This is because the disconnect() of the first reader thread could
generate the unavailable presence, but was blocked afterwards when
entering the synchronized disconnect(Presence unavailablePresence).

SMACK-633.
2015-06-13 19:26:57 +02:00
Florian Schmaus
989076a166 Make synchronization point return the exception
instead of a boolean value.
2015-06-13 19:26:57 +02:00
Florian Schmaus
72972dad82 Log when server sends closing stream element 2015-06-13 19:26:57 +02:00
Florian Schmaus
3875664128 Check for closing stream tag's namespace 2015-06-13 19:26:22 +02:00
Florian Schmaus
de29871120 Replace socketClosed with queue.isShutdown() 2015-06-13 19:23:37 +02:00
Florian Schmaus
d49fadd466 Log integeration testType also 2015-06-13 19:23:36 +02:00
Florian Schmaus
13224a9662 More information in closed on error log 2015-06-09 22:25:19 +02:00
Florian Schmaus
ffea35282c Don't make NotConnectedException fatal
If such an exception ever happes when running a integration, then the
framework should not abort, but instead log the exception so that other
information is also logged.
2015-06-09 22:16:41 +02:00
Florian Schmaus
b9782aa6bc Handle junit's AssertionError in integration tests 2015-06-09 22:16:23 +02:00
Florian Schmaus
a85ba5311e Add more information to NotConnectedException 2015-06-09 22:16:01 +02:00
Florian Schmaus
a854e04d28 Replace shutdownInProgress with queue status 2015-06-09 22:15:23 +02:00
Florian Schmaus
bad52fad21 Deprecate setServiceName in favor of setXmppDomain 2015-06-08 14:42:05 +02:00
Florian Schmaus
4d7279d036 Improve PubSubNamespace 2015-06-06 17:44:08 +02:00
Florian Schmaus
fce0aeadef Add support for PubSub affiliation actions as owner
SMACK-675.
2015-06-06 17:38:59 +02:00
Florian Schmaus
f7782aa466 Extend PubSub Affiliation class by 'jid'
to allow pubsub#owner affiliation operations. SMACK-674.
2015-06-06 17:38:55 +02:00
Florian Schmaus
4a857fe67a Assert that a Stanza is a Stanza in sendStanza 2015-06-06 11:16:12 +02:00
Florian Schmaus
58402c5615 Bump jxmpp to 0.5.0-alpha5 and change Roster API
to only allow bare JIDs as roster entires.
2015-06-06 11:16:12 +02:00
Florian Schmaus
2f219c7317 Rename processPacket to processStanza
and assert that 'stanza' is a Stanza.
2015-06-05 14:04:17 +02:00
Florian Schmaus
c1192f18b4 Add support for vCard PREFIX and SUFFIX elements
SMACK-673
2015-06-04 22:29:36 +02:00
Florian Schmaus
1cd268a8f0 Deprecate Forwarded.getForwardedPacket() 2015-06-02 17:30:57 +02:00
Florian Schmaus
9a00e09c0a Improve NoResponseException messages 2015-06-02 17:30:57 +02:00
Florian Schmaus
2079ba6bd6 Merge branch '4.1'
Conflicts:
	smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentSession.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/OfferRevokeProvider.java
2015-05-27 22:50:55 +02:00
Florian Schmaus
7a3ca4fd68 Fix memory leak caused by RosterGroup
SMACK-672
2015-05-27 22:44:27 +02:00
Florian Schmaus
1d1ea5dd10 Improve Roster API
Make Roster entries Map from BareJid to RosterEntry, since only
bare JIDs are allowed as roster items as per RFC 6121 § 3.1.1

   When a user sends a presence subscription request to a potential
   instant messaging and presence contact, the value of the 'to'
   attribute MUST be a bare JID <contact@domainpart> rather than a full
   JID <contact@domainpart/resourcepart>,…

Also some further Roster API changes regarding JIDs.
2015-05-27 22:34:43 +02:00
Florian Schmaus
c125a3b055 Bump jxmpp to 0.5.0-alpha4 2015-05-27 19:29:51 +02:00
Florian Schmaus
8840236b72 Gracefully disconnect XMPPTCPConnection
That is, wait with a timeout for a closing stream element if we have
sent a closing stream element to the server. See RFC 6120 § 4.4.

Fixes SMACK-633.
2015-05-27 17:36:04 +02:00
Florian Schmaus
6632345efc Register IQ request handler for Offer(Request|Revoke) IQs
Fixes SMACK-664.
2015-05-24 22:36:33 +02:00
Florian Schmaus
01f08e87c2 Merge branch '4.1'
Conflicts:
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java
	version.gradle
2015-05-24 22:36:11 +02:00
Florian Schmaus
35317a19bd Remove ConnectionListener from Socks5BytestreamManager
and use weak references.

Disabling the Socks5Manager every time the connection is terminated, and
re-enabling it when it got connected again causes unwanted side
effects. Like adding a new feature to the ServiceDiscoveryManager causes
an update of the entity's capabilities, which then triggers a new outgoing
presence (announcing the new caps version).

SMACK-671
2015-05-24 22:33:26 +02:00
Florian Schmaus
385798f9ba Only add Entity Capabilities extension to available presences
Also don't override eventually send presences on
updateLocalEntityCaps(), instead save the last sent Presence stanza and
re-send that stanza.

SMACK-669.
2015-05-22 08:45:53 +02:00
Florian Schmaus
c120bc1cbc Handle empty array in SASLMechanism.authenticate()
like null array.

Thanks to Anthony Sorvari for reporting.

Fixes SMACK-670.
2015-05-22 08:24:54 +02:00
Florian Schmaus
2365c4c208 Add Roster.addSubscribeListener()
Remove unnecessary 'Unsubscribe' case in Roster: It is not required to
acknowledge these.
2015-05-21 22:41:21 +02:00
Florian Schmaus
8db0403138 Improve writing XML elements to socket
Instead of allocating one big continuous memory block before "writing"
the XMPP stream element to the socket, write the single CharSequences of
LazyStringBuilder/XmlStringBuilder.

Also change Obserable writer to only notify the listeners after a
flush *or* if a certain limit has been reached since the last
notification. Otherwise the debugger would "print" every single XML part
as result of this change.
2015-05-21 22:41:21 +02:00
Florian Schmaus
576980097e Request SM ack when re-sending after stream resumption
Fixes SMACK-667.
2015-05-19 14:21:52 +02:00
Florian Schmaus
3c2ba0ec43 Add AbstractXMPPConnection.getUsedSaslMechanism()
and improve isAnonymous(). Also some minor changes to
SASLAuthentication.
2015-05-19 09:26:59 +02:00
Florian Schmaus
f369a009ac Rename 'serviceName' to 'xmppServiceDomain'
Also use 'null' as default value for the resource, to enforce server
generated resources.

Fixes Smack-665
2015-05-19 09:26:59 +02:00
Florian Schmaus
0c8199650b Improve parsing exception callback.
Fixes SMACK-631.
2015-05-18 12:38:25 +02:00
Florian Schmaus
21c7007212 Make Roster.waitUntilLoaded() package-private
there is no point in having it 'protected', since Roster is not
subclassable.
2015-05-15 17:04:10 +02:00