1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-01 17:55:59 +01:00
Commit graph

4168 commits

Author SHA1 Message Date
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
Florian Schmaus
814cc1fdde Create low-level inttest accounts with test run ID 2016-12-19 18:11:19 +01:00
Florian Schmaus
26b16665e5 Add setting to enable IoT Managers automatically
or not. Since they interfer a lot with existing code (presence
management etc.)
2016-12-19 18:11:18 +01:00
Florian Schmaus
8511a9e67b Fix deadline check
The pattern

if (now > deadline) break;
wait(deadline - now);

is insufficient in case "now == deadline" because the result would be
wait() being called with 0, which would mean "wait until
notified". Thus, the timeout would become infinite.
2016-12-19 16:29:16 +01:00
Florian Schmaus
cfe5c2233d Fix integration test using XEP-0133 credentials
for the created connections.
2016-12-19 14:13:53 +01:00
Florian Schmaus
a8a148945f Improve MessageEventManager's log message 2016-12-10 11:48:20 +01:00
Florian Schmaus
61bdc6f28c Fix MessageEventNotificationListener 2016-12-10 11:47:24 +01:00
Florian Schmaus
1151371c36 Fix MessageEventManager.fireMessageEvent…() 2016-12-10 11:46:05 +01:00
Florian Schmaus
23475c33b7 Smack 4.2.0-beta4-SNAPSHOT 2016-12-08 10:11:19 +01:00
Florian Schmaus
529e9065fb Smack 4.2.0-beta3 2016-12-08 10:01:22 +01:00