OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

dc_rpc_service_retry - Retry a service function

Format

ANSI C, C++

#include <dcrpc.h>
int  dc_rpc_service_retry (void)

K&R C

#include <dcrpc.h>
int  dc_rpc_service_retry ()

Description

The function dc_rpc_service_retry() retries processing of the service function being executed. For a retry, call the function dc_rpc_service_retry() in the service function, then return the service function to be retried. After the return, the service function restarts in the same process.

If the service function called by a response RPC is retried, the values (the area to contain a response and the length of the response) set by the service function before the retry are invalidated.

If the function dc_rpc_service_retry is called after the number of retries set in the rpc_service_retry_count operand of the user service definition has been reached (including when 0 has been specified in the rpc_service_retry_count operand), the function returns error code DCRPCER_RETRY_COUNT_OVER, and control is returned due to the error. At this time, the service function is not retried. The service function called by a response RPC returns the contents of the area containing a response to the client UAP.

Return values

Return value Return value (numeric) Explanation
DC_OK 0 Normal termination.
DCRPCER_RETRY_COUNT_OVER -377 The function dc_rpc_service_retry() is called more than the maximum number of service retries specified in the rpc_service_retry_count operand of the user service definition. The service function cannot be retried any more.
DCRPCER_PROTO -302 The function dc_rpc_service_retry() is called under either of the following incorrect conditions:
  • The function is not called in the service function.
  • It is called within the global transaction.

Notes

  1. Call the function dc_rpc_service_retry() under the following conditions. If these conditions are not satisfied, the function returns a value indicating an error, and control is returned.
    • The function dc_rpc_service_retry() is called in the service function.
    • The service function being executed is not within the global transaction.
  2. The service function calling the function dc_rpc_service_retry() can reference the data passed by the client UAP, but cannot change it. If the contents of the input data area are changed, the system operation is undefined.
  3. The function dc_rpc_service_retry() can be called only by the service function from which a service was requested by the OpenTP1 specific remote procedure call (function dc_rpc_call()). Processing of the other service functions cannot be retried by the function dc_rpc_service_retry().