Gerolf Seitz wrote:
> hi Bernd,
>
> If a session is bound to more than one resource, how could we determine
>> which one to process with?
>
>
> well, there are some places that use the initiating entity, and since we can
> get the bare jid from a full jid,
> i thought it wouldn't hurt to update the initiating entity to reflect the
> first bound resource. and some guys from
>
jdev@... confirmed that too (though that's nothing
> official).
but then we'd have to (remember to) strip the resource from the entity
everytime we do explicitly not need the resource.
we'd have to also incorporate the ugly logic of removing the resource on
unbind and re-adding reasonable other one.
>> Proposal: If the client does not send full JID (FJID), then we check the
>> session for a unique resource id. If there is not exactly one, we return a
>> stanza error. Else, we proceed with the FJID we determined.
>>
>
> hm, i kinda really only want to return a stanza error when the rfc states to
> do so.
+1
> as for the presence probing:
> the rfc states that only the first ressource in a session should to that,
> because all subsequent resource can use the presence information gathered
> for the first bound resource. (sry, a bit off topic).
so this boils down to that essentially any resource can be used for that
but that the canonical choice is the first (and in most cases probably:
the only) resource.
> so, are you okay with something like this? (pseudocode)
> String resId = bindResource(this);
> if (resourcesForSession == 1) {
> modifyInitialEntity(resId);
> }
> return resId;
against my initial opinion I am coming to the conclusion that we should
keep a list of bound resources in the session.
this is either with or without using modifyInitialEntity(resId). the
latter should be decided, IMHO, by what we need more often: bare or full
jid.
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail:
labs-unsubscribe@...
For additional commands, e-mail:
labs-help@...