1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-10-20 21:15:59 +02:00
Commit graph

5177 commits

Author SHA1 Message Date
Florian Schmaus
ff97d2eb35 Make BlockContactsIQProvider idiomatic
The jids list doesn't have to be lazy initialized, because every IQ of
that type is guaranteed to contain at least one JID.

Also use ParserUtils.getJidAttribute().
2017-01-20 08:56:56 +01:00
Florian Schmaus
b3662c0682 Make UnblockContactsIQ immutable
and make the serialization function idiomatic.
2017-01-20 08:56:50 +01:00
Florian Schmaus
07cba5b974 Make BlockContactsIQ immutable 2017-01-20 08:56:44 +01:00
Florian Schmaus
965cbcc979 Fix memory leak in MultiUserChat.enter(MucEnterConfiguration)
Thanks to Aleksander Melnichnikov for reporting this issue.

Fixes SMACK-745
2017-01-20 08:56:37 +01:00
Florian Schmaus
f2a3cce094 Merge branch '4.2' 2017-01-18 20:30:24 +01:00
Florian Schmaus
e5980641c0 Fix "XEP-0323: IoT - Sensor Data" namespace in provider
This is a follow up commit of 9d8caf0563
2017-01-17 11:11:25 +01:00
Florian Schmaus
382ed9d871 Smack 4.2.0-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQF8BAABCgBmBQJYe7kjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5Nzc1MDU5RjNBMjFEQ0UxNkJFNEZCQUUy
 MjM5QTdFOEY1ODUyMDUyAAoJECI5p+j1hSBSuGkH/1mU66MNR0/ywbdZ2RKcb9MK
 WTHBBOuD/KaqkQOQQ5Fud+ktyahmDd9Nk4TbchIJ56PlEPqJbhnwP8txh1gU+8Zz
 jpRHYYQiTEuLSblToVL3afrfd/IQnOrh7VbwkG7S1wkWmOFKCv94wlv/OgZFaICc
 RHHJyJbJ0TTuavEkJ141ruNYmq/qYjUjdLmFrqhT3hv3iuiHCT1PK1787wEB0EWS
 ciwkw2j/j/2i27XNQRwu7QaLsmUGk8rLnr2/AsYpmsBsjAMqMbNEQEPbIgO9MVef
 7dt/GWoqHjH1opVcOw+rRz/cynMii2sSTXiqRVTEZsWlx3uYYz5eKsuiuckZcBs=
 =yqh1
 -----END PGP SIGNATURE-----

Merge tag '4.2.0-rc2'

Smack 4.2.0-rc2
2017-01-15 20:02:13 +01:00
Florian Schmaus
88d59a0a1c Smack 4.2.0-rc3-SNAPSHOT 2017-01-15 11:02:40 +01:00
Florian Schmaus
ce194819db Smack 4.2.0-rc2 2017-01-15 10:02:22 +01:00
Florian Schmaus
7c46f58c80 Rename "PacketReplyTimeout" → "ReplyTimeout" 2017-01-12 20:57:19 +01:00
Florian Schmaus
b5415fe841 Don't wait the reply timeout in OfflineMessageManager.getMessages(List<String>)
for the last message. We now count the number of messages we want to
retrieve, and don't wait for another message if we have already
received all.

Thanks to King Jeong Hun for reporting this.
2017-01-12 13:40:55 +01:00
Florian Schmaus
f31cc6e043 Fix IllegalArgumentException on DNS lookup if XMPP domain is wrong
Fixes the following exception thrown if the user had entered a non-existend XMPP domain:
java.lang.IllegalArgumentException: Must provide at least one InetAddress
     at org.jivesoftware.smack.util.dns.HostAddress.<init>(HostAddress.java:55)
     at org.jivesoftware.smack.util.dns.DNSResolver.lookupHostAddress(DNSResolver.java: 56)
     at org.jivesoftware.smack.util.DNSUtil.resolveDomain(DNSUtil.java:209)
     at org.jivesoftware.smack.util.DNSUtil.resolveXMPPServiceDomain(DNSUtil.java:136)
     at org.jivesoftware.smack.AbstractXMPPConnection.populateHostAddresses(AbstractXMP PConnection.java:626)
     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPC onnection.java:556)
     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection. java:888)
     at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.ja va:377)

Thanks to Grigory Fedorov for reporting.
2017-01-12 13:39:11 +01:00
Florian Schmaus
9d8caf0563 Fix "XEP-0323: IoT - Sensor Data" namespace 2017-01-12 12:48:07 +01:00
Florian Schmaus
d47463a533 Deprecate Chat API, introduce new Chat API
Also add (From|To)TypeFilter and update/fix the documentation in a few places.
2017-01-11 19:48:22 +01:00
Florian Schmaus
b0fef6ffcb Ensure that populateHostAddressees() doesn't return a list with 'null'
Thanks to Grigory Fedorov for reporting this.
2017-01-09 19:36:21 +01:00
Florian Schmaus
51d3c31766 Initialize Socket in TCP connection when proxy is used
Thanks to Grigory Fedorov for reporting this.
2017-01-08 22:58:23 +01:00
Florian Schmaus
4cd014397c Merge pull request #99 from akrherz/loc--
Remove legacy CVS keywords
2017-01-07 14:55:01 +01:00
Florian Schmaus
bfc14227ca Propagate stream errors on connect/login to the caller
Before this, if there was a stream error response by the server to our
stream open, that error response would only be handled in the reader
thread, and the user would get a message like:

"org.jivesoftware.smack.SmackException$NoResponseException: No
response received within reply timeout. Timeout was
5000ms (~5s). While waiting for SASL mechanisms stream feature from
server"

while the server may actually sent something like

<stream:stream
  xmlns='jabber:client'
  xmlns:stream='http://etherx.jabber.org/streams'
  id='6785787028201586334'
  from='jabbim.com'
  version='1.0'
  xml:lang='en'>
  <stream:error>
    <policy-violation xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
	</policy-violation>
	<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
	  Too many (2) failed authentications from this IP
      address (1xx.66.xx.xxx). The address will be unblocked at 04:24:00
      06.01.2017 UTC
    </text>
  </stream:error>
</stream:stream>

It was necessary to change saslFeatureReceived from SmackException to
XMPPException in order to return the StreamErrorException at this sync
point. But this change in return required the introduction of a
tlsHandled sync point for SmackException (which just acts as a wrapper
for the various exception types that could occurn when establishing
TLS). The tlsHandled sync point is marked successful even if no TLS
was established in case none was required and/or if not supported by
the server.
2017-01-07 10:38:41 +01:00
Florian Schmaus
cff91f5a92 Use correct element and namepsace in AccountManager.isSupported() 2017-01-07 10:38:41 +01:00
Florian Schmaus
7167a55f81 AccountManager: Don't fallback to disco#info if not authenticated 2017-01-06 14:56:35 +01:00
Florian Schmaus
24bbe63da1 Minor code improvements in DNSutil 2017-01-06 14:49:12 +01:00
akrherz
6039c8a54a
Remove legacy CVS keywords 2017-01-05 12:03:36 -06:00
Florian Schmaus
b343b499b5 MiniDNS resolver: Fix exception when there is only a A or AAAA RR
W/System.err: java.lang.IllegalStateException: Can not perform operation because the DNS resolution was unsuccessful
W/System.err:     at de.measite.minidns.hla.ResolverResult.throwIseIfErrorResponse(ResolverResult.ja va:113)
W/System.err:     at de.measite.minidns.hla.ResolverResult.getAnswers(ResolverResult.java:56)
W/System.err:     at org.jivesoftware.smack.util.dns.minidns.MiniDnsResolver.lookupHostAddress0(Mini DnsResolver.java:130)
W/System.err:     at org.jivesoftware.smack.util.dns.DNSResolver.lookupHostAddress(DNSResolver.java: 52)
W/System.err:     at org.jivesoftware.smack.AbstractXMPPConnection.populateHostAddresses(AbstractXMP PConnection.java:612)
W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPC onnection.java:555)
W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection. java:885)
W/System.err:     at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.ja va:374)
W/System.err:     at com.example.bosleo.chatapp.ChatConnection.connect(ChatConnection.java:147)
W/System.err:     at com.example.bosleo.chatapp.ChatConnectionService.initConnection(ChatConnectionS ervice.java:82)
W/System.err:     at com.example.bosleo.chatapp.ChatConnectionService.access$100(ChatConnectionServi ce.java:20)
W/System.err:     at com.example.bosleo.chatapp.ChatConnectionService$1.run(ChatConnectionService.ja va:105)
W/System.err:     at java.lang.Thread.run(Thread.java:818)
W/System.err: Caused by: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for 192.168.2.128. IN AAAA yielded an error response NX_DOMAIN
W/System.err:     at de.measite.minidns.hla.ResolverResult.getResolutionUnsuccessfulException(Resolv erResult.java:89)
W/System.err:     at de.measite.minidns.hla.ResolverResult.throwIseIfErrorResponse(ResolverResult.ja va:111)
W/System.err: ... 12 more
2017-01-05 09:29:31 +01:00
Florian Schmaus
96aad6a4aa Add TODOs about when to remove deprecated methods 2017-01-04 16:00:53 +01:00
Florian Schmaus
e9bbe9a475 Fix OOB exception when setHostAddress(InetAddress) is used.
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  at java.lang.String.charAt(String.java:658)
  at org.jivesoftware.smack.util.dns.HostAddress.<init>(HostAddress.java:48)
  at org.jivesoftware.smack.util.dns.HostAddress.<init>(HostAddress.java:62)
2017-01-04 15:35:47 +01:00
Florian Schmaus
50a8ff08e3 Re-activate FormTest integration test 2017-01-04 00:32:52 +01:00
Florian Schmaus
157ff138a4 Smack 4.2.0-rc2-SNAPSHOT 2017-01-03 12:08:44 +01:00
Florian Schmaus
ddf90abb85 Smack 4.3.0-alpha1-SNAPSHOT 2017-01-03 12:07:11 +01:00
Florian Schmaus
0d14b9d9b9 Smack 4.2.0-rc1 2017-01-03 11:45:17 +01:00
Florian Schmaus
a8429d45f6 Do not wait for the closing stream element on instant shutdown 2017-01-03 11:44:44 +01:00
Florian Schmaus
90a5e289f8 s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/ 2017-01-03 11:35:04 +01:00
Florian Schmaus
9328182912 Rework Bits of Binary implementation 2017-01-03 11:05:46 +01:00
Florian Schmaus
c688acaa0f Add XEP-0231: Bits of Binary implementation
Fixes SMACK-737
2017-01-03 11:00:05 +01:00
Florian Schmaus
70e860fe27 Add SmackConfiguration.addDisabledSmackClasses(String...) 2017-01-03 11:00:05 +01:00
Florian Schmaus
1bce31fcd9 Handle outgoing 'unavailabe' presences in Roster
Fixes SMACK-733
2017-01-03 10:56:01 +01:00
Florian Schmaus
0b19c1b8ef Update README and documentation 2017-01-03 08:55:14 +01:00
Fernando Ramirez
018a7dd93a Blocking Command: add blocked error management and refactor SMACK-731 2017-01-02 16:02:10 +01:00
Florian Schmaus
5c2d18deb4 Bump MiniDNS to 0.2 2017-01-02 10:46:07 +01:00
Florian Schmaus
5027e9001f Bump jBOSH to 0.9 2017-01-02 09:41:08 +01:00
Florian Schmaus
183c605278 Bump JXMPP to 0.5.0 2017-01-02 09:40:46 +01:00
Florian Schmaus
f633313c4a Add Message.setBody(CharSequence) 2017-01-02 00:47:25 +01:00
Fernando Ramirez
f7fcff139c Add MAM methods to load previous page and to load most recent page 2016-12-29 00:13:02 +01:00
Florian Schmaus
6f66b31fb7 Set default subscription mode to "reject all"
In order to make the defaults of Smack more secure.
2016-12-28 23:42:30 +01:00
Florian Schmaus
3129165a1c Add ConnectionConfiguration.setHostAddress(InetAddress)
In previous Smack versions, it was possible to set the host's IP
address via setHost(String), this is no longer possible (since the
support for DNSSEC was introduced). The new
setHostAddress(InetAddress) allows it again to explicitly specifiy the
XMPP service's host IP.
2016-12-28 23:18:28 +01:00
Florian Schmaus
7655ac17f2 Re-activate EntityCaps integration test 2016-12-24 10:27:04 +01:00
Florian Schmaus
1f7770b831 More detailed logging to RosterIntegrationTest 2016-12-23 23:52:29 +01:00
Florian Schmaus
ecf1ed7f6b Fix EntityCapsManager presenceSend
capturing all outoing presences of type 'available' would also capture
presences not used for presence broadcast, e.g., MUC presences.

This caused the EntityCaps integration test (localEntityCaps) to fail
if the MUC integration test was run before.
2016-12-23 23:52:29 +01:00
Florian Schmaus
ca394838f0 Make sinttest (Before|After)Class methods non-static 2016-12-23 23:42:47 +01:00
Florian Schmaus
01169a956c Log when executing (Before|After) class sinttest methods 2016-12-23 23:42:47 +01:00
Florian Schmaus
e27e416063 Fix sinttest log string: s/AfterClass/BeforeClass/ 2016-12-23 23:42:47 +01:00