4.4.2 Terminating a Session by a Secondary Partner
In this example, the secondary partner initiates the session termination process by sending a BeginTearDown call to the primary partner, passing the primary partner's PCONTEXT_HANDLE and the reason for the tear-down request; in this example, the TEAR_DOWN_TYPE is TT_FORCE.
|
Field |
Value description |
|---|---|
|
phContext |
PCONTEXT_HANDLE=0x005f90e0 |
|
TearDownType |
TT_FORCE |
When the primary partner receives the BeginTearDown call, it will send a TearDownContext call to the secondary partner, passing a pointer to the secondary partner PCONTEXT_HANDLE, its SESSION_RANK (that is, SRANK_PRIMARY), and a reason for tearing down the session sent to it in the BeginTearDown call (that is, TT_FORCE).
|
Field |
Value description |
|---|---|
|
pphContext [in_out] |
*PPCONTEXT_HANDLE=0x0012af48 |
|
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=0x005f90e0 |
|
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.