Purpose
ha_gs_goodbye - Called by a provider of a group to immediately leave the group
Library
GSAPI Thread-Safe Library (libha_gs_r.a)
GSAPI Library (not thread-safe) (libha_gs.a)
Syntax
#include <ha_gs.h> ha_gs_rc_t ha_gs_goodbye(ha_gs_token_t provider_token
Parameters
Description
The ha_gs_goodbye() subroutine enables a provider to immediately leave its group as if it had failed, while informing the group that it "failed" voluntarily. This is a synchronous interface.
If this call returns with an HA_GS_OK return code, then the calling provider is no longer in the group.
If the group is in an n-phase protocol, the provider issuing the ha_gs_goodbye protocol is considered to have failed. The Group Services subsystem will apply the group's default vote for any subsequent voting phases in that protocol.
The result of a provider successfully issuing this call is that when the remaining providers in the group see this provider's failure protocol, the leave reason for this provider will be set to HA_GS_PROVIDER_SAID_GOODBYE. (See the discussion of gs_leave_info in the section about the ha_gs_n_phase_callback subroutine on page ***.)
Restrictions
The calling process must be a provider.
Return Values
If the ha_gs_goodbye subroutine is successful, it returns a value of 0 (HA_GS_OK).
Error Values
If the ha_gs_goodbye subroutine is unsuccessful, it returns an error number. If the error is detected immediately, an error is returned synchronously.
The GSAPI error numbers are defined in the ha_gs.h header file. For more information on GSAPI errors, see GSAPI errors (err_gsapi).
Synchronous Errors
The following errors may be returned synchronously by the ha_gs_goodbye subroutine:
Asynchronous Errors
None.
Files
ha_gs.h
Prerequisite Information
Related Information
Subroutines: ha_gs_init, ha_gs_join, ha_gs_send_message, ha_gs_leave, ha_gs_expel, ha_gs_subscribe, ha_gs_change_attributes