4.4.1 Terminating a Session by a Primary Partner
A primary partner terminates a session by sending a TearDownContext call to the secondary partner, passing a pointer to the PCONTEXT_HANDLE given to it from the secondary partner, its SESSION_RANK (that is, SRANK_PRIMARY), and a reason for tearing down the session; in this example, the TEAR_DOWN_TYPE is TT_FORCE.
Field |
Value description |
---|---|
pphContext [in_out] |
*PPCONTEXT_HANDLE=0x0053b710 |
sRank |
SRANK_PRIMARY |
TearDownType |
TT_FORCE |
When the secondary partner receives the TearDownContext call, it will send a TearDownContext call to the primary partner, passing a pointer to the PCONTEXT_HANDLE passed to it from the primary partner, its SESSION_RANK (that is, SRANK_SECONDARY), and copy the TEAR_DOWN_TYPE from the incoming call (that is, TT_FORCE).
Field |
Value description |
---|---|
pphContext [in_out] |
*PPCONTEXT_HANDLE=0x00436e68 |
sRank |
SRANK_SECONDARY |
TearDownType |
TT_FORCE |
When the primary partner receives the TearDownContext request, it will delete its PCONTEXT_HANDLE and null out pphContext. Any negotiated resources will be released, and it will reply S_OK.
Field |
Value description |
---|---|
pphContext [in_out] |
*PPCONTEXT_HANDLE=0x00000000 |
When the secondary partner receives S_OK on the TearDownContext call, it will delete its PCONTEXT_HANDLE and null out pphContext. Any negotiated resources will be released, and it will reply S_OK.
Field |
Value description |
---|---|
pphContext [in_out] |
*PPCONTEXT_HANDLE=0x00000000 |
The session has now been terminated, and no further messages will be sent.