![]() |
![]() |
The dsmEndTxn function call ends a TSM transaction. Pair the dsmEndTxn function call with dsmBeginTxn to identify the call or set of calls that are considered a transaction. The application client can specify on the dsmEndTxn call whether or not the transaction should be committed or ended.
Perform all of the following calls within the bounds of a transaction:
dsInt16_t dsmEndTxn (dsUint32_t dsmHandle, dsUint8_t vote, dsUint16_t *reason);
Parameters
DSM_VOTE_COMMIT /* commit current transaction */ DSM_VOTE_ABORT /* roll back current transaction */
Use DSM_VOTE_ABORT only if your application has found a reason to stop the transaction.
If the application specifies a vote of DSM_VOTE_ABORT, the reason code will be DSM_RS_ABORT_BY_CLIENT (3). See Appendix C, API Return Codes Source File for a list of the possible reason codes. Numbers 1 through 50 in the return codes list are reserved for the reason codes. If the server ends the transaction, the return code will be DSM_RC_CHECK_REASON_CODE. In this case, the reason value will contain more information on the cause of the abort.
The return code numbers are provided in parentheses ( ).
Table 26. Return Codes for dsmEndTxn
Return Code | Explanation |
---|---|
DSM_RC_ABORT_CRC_FAILED (236) | The CRC that was received from the server does not match the CRC that was calculated by the client. |
DSM_RC_INVALID_VOTE (2011) | The value that was specified for vote is not valid. |
DSM_RC_CHECK_REASON_CODE (2302) | The transaction was aborted. Check the reason field. |