aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-07-04 08:57:28 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-07-04 08:57:28 +0300
commitbce8922e5d03b157b64425be23e68e21b5e5c3db (patch)
treef0bb931a3f3209c4ad78443f5945b30722eb669e
parentmod_http_upload: Treat file and network errors differently (diff)
Don't set from/to attributes in resource binding iq
-rw-r--r--src/xmpp_stream_out.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xmpp_stream_out.erl b/src/xmpp_stream_out.erl
index f11aaf743..c79204ea0 100644
--- a/src/xmpp_stream_out.erl
+++ b/src/xmpp_stream_out.erl
@@ -739,15 +739,13 @@ process_sasl_failure(Reason, State) ->
-spec process_bind(stream_features(), state()) -> state().
process_bind(StreamFeatures, #{lang := Lang, xmlns := ?NS_CLIENT,
- user := U, server := S, resource := R,
+ resource := R,
stream_state := StateName} = State)
when StateName /= established, StateName /= disconnected ->
case xmpp:has_subtag(StreamFeatures, #bind{}) of
true ->
- JID = jid:make(U, S, R),
ID = new_id(),
- Pkt = #iq{from = JID, to = jid:remove_resource(JID),
- id = ID, type = set,
+ Pkt = #iq{id = ID, type = set,
sub_els = [#bind{resource = R}]},
State1 = State#{stream_state => wait_for_bind_response,
bind_id => ID},