3.4.6.1.2 Secondary

When the local partner is the secondary partner, it MUST use the provided name object to check whether or not an existing session with a matching name object already exists in the session table.

  • If an existing session is found, the session object is returned to the level-two protocol and the request completes successfully.

  • Otherwise, a new session object MUST be created and added to the session table.

After creating a new session object, the secondary partner MUST make a call to either the Poke method or the PokeW method on the primary partner. (For making calls to a partner, see section 3.4.)

To determine whether the primary partner supports PokeW, the secondary partner calls PokeW on the primary partner and waits for a return value. If the call completes with error code RPC_S_PROCNUM_OUT_OF_RANGE, then the primary partner does not support PokeW.

If the primary partner does not support the PokeW method, the secondary partner MUST call the Poke method.

If the primary partner does support the PokeW method, the secondary partner MUST NOT call the Poke method.

If the call completes successfully, the secondary partner MUST wait until a session object associated with the provided name object is in the session table and the state of that session object is Active.

If the call completes unsuccessfully, the secondary partner SHOULD behave according to the error code that was returned:

  • If the error code is 0x80000172 (E_CM_VERSION_SET_NOTSUPPORTED) or 0x80000173 (E_CM_S_PROTOCOL_NOT_SUPPORTED), or it retried the nested call for more than the number of times specified in the Session Setup Retry Count ADM element, or if the State field of the session object is not "Confirming Connection", the secondary partner MUST remove the session object from the session table and clean it up.  For instructions on cleaning up a session object, see section 3.2.1.3.

  • If the error code is 0x80000123 (E_CM_SERVER_NOT_READY) or 0x000006BB (RPC_S_SERVER_TOO_BUSY), or any other implementation-specific error code, the secondary partner SHOULD retry the call for the number of times specified in the Session Setup Retry Count ADM element.

If an error is reported to the level-two protocol, the session object MUST be removed from the session table and cleaned up. For instructions regarding how to clean up a session object, see section 3.2.1.3.