Purpose
ha_gs_delayed_error_callback - A callback routine that the Group Services subsystem calls to deliver an asynchronous error notification to a GS client
Library
GSAPI Thread-Safe Library (libha_gs_r.a)
GSAPI Library (not thread-safe) (libha_gs.a)
Syntax
#include <ha_gs.h> void ha_gs_delayed_error_callback( const ha_gs_delayed_error_notification_t *notification)
Parameters
Description
Delayed errors are asynchronous errors. They occur when a GS client has submitted a proposal, (such as to join a group, broadcast a message, or change the group's state value) and the Group Services subsystem later discovers a problem with the proposal. When such an error occurs, Group Services delivers it to the GS client by invoking a callback routine.
The ha_gs_delayed_error_callback subroutine defines a GS client's delayed error callback routine. The GS client uses it to handle delayed error notifications from the Group Services subsystem. The process provides the address of the delayed error callback routine to the Group Services subsystem on the ha_gs_init subroutine during GSAPI initialization. The Group Services subsystem then calls the delayed error callback routine when it has a delayed error notification to deliver to the GS client.
On input, the delayed error callback routine receives a pointer to the delayed error notification block. The delayed error notification block has the following definition:
typedef struct { ha_gs_notification_type_t gs_notification_type; ha_gs_token_t gs_request_token ha_gs_request_t gs_protocol_type; ha_gs_rc_t gs_delayed_return_code; ha_gs_proposal_ info_t *gs_failing_request; } ha_gs_delayed_error_notification_t;
The gs_notification_type field contains the type of notification. For a delayed error notification, it contains a value of HA_GS_DELAYED_ERROR_NOTIFICATION.
The gs_protocol_type field contains the type of request for which this delayed error is being delivered.
The gs_delayed_return_code field contains error number of the delayed error. The GSAPI error numbers are defined in the ha_gs.h header file. For more information on GSAPI errors, see GSAPI errors (err_gsapi).
The gs_failing_request field points to the proposal information block for the proposal that is in error.
The proposal information block has the following definition:
#define gs_join_request _gs_protocol_info._gs_join_request
#define gs_state_change_request _gs_protocol_info._gs_state_change_request
#define gs_message_request _gs_protocol_info._gs_message_request
#define gs_leave_request _gs_protocol_info._gs_leave_request
#define gs_expel_request _gs_protocol_info._gs_expel_request
#define gs_subscribe_request _gs_protocol_info._gs_subscribe_request
#define gs_attribute_change_request _gs_protocol_info._gs_attribute_change_request
typedef struct
{
union {
ha_gs_join_request_t _gs_join_request;
ha_gs_state_change_request_t _gs_state_change_request;
ha_gs_message_request_t _gs_message_request;
ha_gs_leave_request_t _gs_leave_request;
ha_gs_expel_request_t _gs_expel_request;
ha_gs_subscribe_request_t _gs_subscribe_request;
ha_gs_attribute_change_request_t _gs_attribute_change_request;
} _gs_protocol_info;
} ha_gs_proposal_info_t;
For details on the block that defines each type of proposal, see the subroutine that is used to initiate the proposal, as follows:
Restrictions
For important information about multiprocessing considerations that apply to all callback routines, see the ha_gs_n_phase_callback man page.
Return Values
None.
Error Values
None.
For information about GSAPI synchronous and asynchronous errors, see GSAPI errors (err_gsapi).
Synchronous Errors
None.
Asynchronous Errors
None.
Files
ha_gs.h
Prerequisite Information
Related Information
Subroutines: ha_gs_init, ha_gs_join, ha_gs_change_state_value, ha_gs_send_message, ha_gs_leave, ha_gs_expel, ha_gs_subscribe, ha_gs_change_attributes