According to XEP-0004 § 3.3, the default value of a boolean form field
is 'false'. And since users are typically interested in getting the
value, and not potentially 'null' as result, we adjust the behavior of
the getValueAsBoolean() method consider the default value.
Similar fix as 9b339efbc1 ("Prevent password enforcement for SASL
anonymous") just for SASL GSSAPI. Fixes SMACK-920.
Fixes: 92f4aadfdc ("[sasl] Avoid mechanisms that need a password when none is available")
Since notify() is a rather expensive operation, we should only invoke
it once. Especially since some servers include 110 in all self
presences, not just the initially reflected one on MUC join.
The change in 52a49769f9 ("[muc] Check for self-presence first in
presence listener") caused all self-presences (MUC user status 110) to
be ignored in the further processing chain eventually invoking
checkRoleModifications() and checkAffiliationModifications(). However,
some servers (e.g., ejabberd) include 110 not only in the initial
presence but in all following, and we ant to process these.
Fixes SMACK-918
Fixes: 52a49769f9
Connections like XMPPTCPConnection may still reported connected, if
they are, for example disconnected but resumable. This is already
accounted for in throwAlreadyConnectedExceptionIfAppropriate(), hence
the assert is unnecessary and leads to false negatives for
XMPPTCPConnection.
For the sake of completeness, the right condition, assuming
XMPPTCPConnection is used, for the assert would be:
assert !connected || disconnectedButResumable;
Eventually JingleTransportManager should be a subclass of Manager (or
be replaced by Manager), as JingleTransportManager holds a strong
reference to the XMPPConnection. This could cause memory leaks. But
for now, we mimic the Manager API in JingleTransportManger to make a
future transition to Manager easier.
This allows to avoid redundant XML namespaces within IQs, like for
example here:
<iq xmlns='jabber:client' id='EKP8I-1' type='set'>
<jingle xmlns='urn:xmpp:jingle:1' action='content-accept' sid='MySession'>
<content xmlns='urn:xmpp:jingle:1' creator='initiator' name='Hello world'>
</content>
</jingle>
</iq>
Fixes SMACK-917
Reported-by: Jonathan Lennox
AbstractXMPPConnection waits for the flag lastFeaturesReceived since
57961a8cc1, but it is never set from
BOSH connections. Use parseFeaturesAndNotify instead of
parseFeatures to set the signal.
Similarly the XmlEnvironment is not set from bosh, but required in
ParserUtils.getXmlLang.
Calling userHasLeft before sending the leave presence may result in
invalid state as the MUC presence lister may modify the MUCs local
state, e.g., occupantsMap, conurrently with the leave operation.
If we reset it after the leave presence was send and acknowledged,
then this can not happen as the server will not longer send any MUC
related presences to us.
Also fixes SMACK-914. In theory 52a49769f9 ("[muc] Check for
self-presence first in presence listener") alone would fix SMACK-914,
but this also fixes it indepentendly of 52a49769f9. Both commits are
sensible, so both are applied.
The assert statement in CarbonManager's connectionClosed() connection
listener callback was erroneous. A connection may be connected, but
never was authenticated. If now the connection is closed, then
carbonsListener was never setup (via the authenticated() callback),
causing the assert to throw an exception.
In 9352225f44 ("Rework SOCKS5 unit tests so that they can be run in
parallel") the call to getSocks5Proxy() in
Socks5BytestreamManager.getLocalStreamHost() was removed. Since
getSocks5Proxy() does also start the local proxy, if it is not already
running, this caused Smack to no longer automatically start the local
proxy.
This commit re-adds the call to getSocks5Proxy() and fixes SMACK-912.