1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-16 20:22:05 +01:00
Commit graph

2689 commits

Author SHA1 Message Date
Florian Schmaus
0d6f00873f Use Travis-CI's container based infra
by adding "sudo: false" and cache maven artifacts.
2015-08-12 10:50:30 +02:00
Florian Schmaus
d711caee38 Use EntityFullJid in MUC's getOccupant(Presence) API
instead of String, which will always return null if used with
ocupantsMap.get(String), because String.equals(Object) is only true if
Object is also instanceof String.

Thanks to Adnan Elezovic for reporting.
2015-08-12 10:22:11 +02:00
Florian Schmaus
f9faebe831 Add (disable|enable)CarbonsAsync() to CarbonsManager 2015-07-31 14:04:03 +02:00
Vaibhav
3bbffeae28 Make abstract package protected methods in PEPItem public
Fixes SMACK-372
2015-07-31 13:37:35 +02:00
Florian Schmaus
e0e4fd9b12 Add checkstyle rule for StringBuilder.append(char)
And replace all instances where String.Builder.append() is called with a
String of length one with append(char).

Also adds StringUtils.toStringBuilder(Collection, String).
2015-07-27 19:02:11 +02:00
Florian Schmaus
19ebcb814b Check that service is MUC service in getHostedRooms()
and otherwhise throw a NotAMucServiceException.
2015-07-17 09:08:04 +02:00
Florian Schmaus
2e03f0f3f3 Improve HostedRoom API
return EntityBareJid instead of Jid.
2015-07-17 09:06:40 +02:00
Florian Schmaus
7032688123 Rework Proxy API
Instead of extending SocketFactory, the proxy support classes now
implement ProxySocketConnection. This removes a lot of unnecessary
code.

Also re-enables proxy support, which was broken in previous versions
because none of extended SocketFactories did override
createSocket() (SMACK-683).
2015-07-17 08:50:19 +02:00
Florian Schmaus
24365f0f1e Fix MultiUserChat javadoc 2015-07-15 22:37:49 +02:00
Florian Schmaus
ea00caca31 Fix MultiUserChat.enter() 'nickname' check
It's no longer necessary to check if 'nickname' is set. The
MucEnterConfiguration API already enforces that.
2015-07-15 22:36:10 +02:00
Florian Schmaus
46f9b9ab39 Improve StringUtils.escapeForXML()
use CharSequence as input.
2015-07-15 19:56:46 +02:00
Florian Schmaus
1c716bc1e0 Smack 4.1.3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJVpgWiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41G1gH+gIw/seXSSY6vYlVkYEFtR+e
 LV/LArN/eN1ZGc+WjN0EysRyqOBqF8HVHuyO7fF67huDRn62s7hufVY//NTctJ5L
 m4TXwaEUvgjdul7vm/dZcNRYr0jcSpDTFWx2egkOXt3qE9AhnpbnaIJ5c3q9VVVD
 aba88c3NS7quxp0hQm1SNEAmt1CCMPom7YkxdIPKWlLj8N5AF1UuSKwckLLYSUlS
 wloBbITb6EjI1IwszhN6e6o3W+7Pz/1zbFjk0CkKUS+TmhHhKil8TonH8Se/9DYD
 1SVHxvZa8LHWsU9G/R1Nhl69K2+GHEUbGmXalFmyPIf5ifhYyNimpx9krXQUuLs=
 =3/cn
 -----END PGP SIGNATURE-----

Merge tag '4.1.3'

Smack 4.1.3
2015-07-15 09:37:46 +02:00
Florian Schmaus
f8d513e37c Smack 4.1.3 2015-07-15 09:02:46 +02:00
Florian Schmaus
710948c8f7 Add support for XEP-360: Nonzas
SMACK-682
2015-07-14 22:43:58 +02:00
Florian Schmaus
734695c80e Improve StringUtils.collectionToString()
Use generics, and iterator and append(char) instead of append(String).
2015-07-14 13:40:23 +02:00
Florian Schmaus
ae944d3546 Only wait in Roster's presence listener if loading
otherwhise skip waitUntilLoaded(). This introduces RosterState.

SMACK-681
2015-07-13 12:58:43 +02:00
Florian Schmaus
36d99ecab3 Fix ChatManager API documentation 2015-07-10 23:09:23 +02:00
Florian Schmaus
57cc3aa3f8 Add MucEnterConfiguration API
Allows to configure the presence used when joining a MUC.

Part of SMACK-648: Improve the MUC API.
2015-07-07 08:52:33 +02:00
Florian Schmaus
0555297a6e Fix Roster.waitUntilLoaded and make it interruptable
waitTime and start need to be initialized outside of the while body.
2015-07-03 14:46:55 +02:00
Florian Schmaus
3bb06b8429 Wait in Roster's presence listener until Roster is loaded
Fixes SMACK-681.
2015-07-03 14:24:13 +02:00
Florian Schmaus
bfdcfba092 Throw NotConnectedException instead of NoResponseException
if the connection is not connected in sendStanzaWithResponseCallback and
in PacketCollector.

Also decrease log level if roster result listener's exeption callback is
invoked with a NotConnectedException.
2015-07-03 13:01:53 +02:00
Florian Schmaus
cd3692f329 Add link to 4.1 Readme to README.md 2015-07-03 09:37:57 +02:00
Florian Schmaus
a73dcd6f53 Shrink try body in XmppHostnameVerifier 2015-07-03 09:37:57 +02:00
Florian Schmaus
19c797777e Add more javadoc and comments to XmppHostnameVerifier 2015-07-03 09:37:57 +02:00
Florian Schmaus
e6a403fb1c Re-escape XML text in parseContentDepth()
SMACK-680.
2015-07-02 16:10:50 +02:00
Florian Schmaus
9ea5c0a2ce "Smackify" HOXT code: Use Smack programming idioms 2015-07-01 13:39:04 +02:00
Tibo-lg
4d57848a0f Update HOXT API to use the buidler pattern. 2015-07-01 12:57:05 +02:00
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