void process_cluster_cfg(int ci) { cs_error_t err; err = corosync_cfg_dispatch(ch, CS_DISPATCH_ALL); if (err != CS_OK) cluster_dead(0); }
static int pcmk_cfg_dispatch(gpointer user_data) { corosync_cfg_handle_t *handle = (corosync_cfg_handle_t *) user_data; cs_error_t rc = corosync_cfg_dispatch(*handle, CS_DISPATCH_ALL); if (rc != CS_OK) { return -1; } return 0; }
static gboolean pcmk_cfg_dispatch(int sender, gpointer user_data) { corosync_cfg_handle_t *handle = (corosync_cfg_handle_t *) user_data; cs_error_t rc = corosync_cfg_dispatch(*handle, CS_DISPATCH_ALL); if (rc != CS_OK) { return FALSE; } return TRUE; }
static int cfg_dispatch_wrapper_fn ( int fd, int revents, void *data) { cs_error_t error; if (revents & POLLHUP || revents & POLLERR) { qb_log (LOG_ERR, "got POLLHUP disconnecting from CFG"); corosync_cfg_finalize(cfg_handle); cfg_handle = 0; return -1; } error = corosync_cfg_dispatch (cfg_handle, CS_DISPATCH_ALL); if (error == CS_ERR_LIBRARY) { qb_log (LOG_ERR, "got LIB error disconnecting from CFG."); corosync_cfg_finalize(cfg_handle); cfg_handle = 0; return -1; } return 0; }
static int cfg_dispatch_wrapper_fn (hdb_handle_t handle, int fd, int revents, void *data) { cs_error_t error; if (revents & POLLHUP || revents & POLLERR) { syslog (LOG_ERR, "%s() got POLLHUP disconnecting from CFG", __func__); poll_dispatch_delete (ta_poll_handle_get(), cfg_fd); close (cfg_fd); cfg_fd = -1; return -1; } error = corosync_cfg_dispatch (cfg_handle, CS_DISPATCH_ALL); if (error == CS_ERR_LIBRARY) { syslog (LOG_ERR, "%s() got LIB error disconnecting from CFG.", __func__); poll_dispatch_delete (ta_poll_handle_get(), cfg_fd); close (cfg_fd); cfg_fd = -1; return -1; } return 0; }