Skip to content

Commit

Permalink
Low: Corosync: Move deprecated corosync variants to their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Apr 19, 2012
1 parent 0bb11c3 commit 18e7801
Show file tree
Hide file tree
Showing 9 changed files with 1,496 additions and 867 deletions.
1 change: 0 additions & 1 deletion cib/main.c
Expand Up @@ -440,7 +440,6 @@ cib_ais_dispatch(AIS_Message * wrapper, char *data, int sender)
static void
cib_ais_destroy(gpointer user_data)
{
ais_fd_sync = -1;
if (cib_shutdown_flag) {
crm_info("Corosync disconnection complete");
} else {
Expand Down
10 changes: 7 additions & 3 deletions crmd/corosync.c
Expand Up @@ -117,7 +117,7 @@ crmd_cman_dispatch(unsigned long long seq, gboolean quorate)
}

static void
crmd_cman_destroy(gpointer user_data)
crmd_quorum_destroy(gpointer user_data)
{
if (is_set(fsa_input_register, R_HA_DISCONNECTED)) {
crm_err("connection terminated");
Expand All @@ -129,7 +129,7 @@ crmd_cman_destroy(gpointer user_data)
}

static void
crmd_quorum_destroy(gpointer user_data)
crmd_ais_destroy(gpointer user_data)
{
if (is_set(fsa_input_register, R_HA_DISCONNECTED)) {
crm_err("connection terminated");
Expand All @@ -140,8 +140,9 @@ crmd_quorum_destroy(gpointer user_data)
}
}

#if SUPPORT_CMAN
static void
crmd_ais_destroy(gpointer user_data)
crmd_cman_destroy(gpointer user_data)
{
if (is_set(fsa_input_register, R_HA_DISCONNECTED)) {
crm_err("connection terminated");
Expand All @@ -151,6 +152,7 @@ crmd_ais_destroy(gpointer user_data)
crm_info("connection closed");
}
}
#endif

extern gboolean crm_connect_corosync(void);

Expand All @@ -169,10 +171,12 @@ crm_connect_corosync(void)
init_quorum_connection(crmd_cman_dispatch, crmd_quorum_destroy);
}

#if SUPPORT_CMAN
if (rc && is_cman_cluster()) {
init_cman_connection(crmd_cman_dispatch, crmd_cman_destroy);
set_bit_inplace(fsa_input_register, R_MEMBERSHIP);
}
#endif
return rc;
}

Expand Down
1 change: 0 additions & 1 deletion fencing/main.c
Expand Up @@ -282,7 +282,6 @@ static void
stonith_peer_ais_destroy(gpointer user_data)
{
crm_err("AIS connection terminated");
ais_fd_sync = -1;
exit(1);
}
#endif
Expand Down
2 changes: 0 additions & 2 deletions include/crm/common/cluster.h
Expand Up @@ -61,8 +61,6 @@ extern void destroy_crm_node(gpointer data);

extern crm_node_t *crm_get_peer(unsigned int id, const char *uname);

extern crm_node_t *crm_update_ais_node(xmlNode * member, long long seq);
extern crm_node_t *crm_update_cman_node(xmlNode * member, long long seq);
extern void crm_update_peer_proc(const char *uname, uint32_t flag, const char *status);
extern crm_node_t *crm_update_peer(unsigned int id, uint64_t born, uint64_t seen, int32_t votes,
uint32_t children, const char *uuid, const char *uname,
Expand Down
4 changes: 4 additions & 0 deletions lib/cluster/Makefile.am
Expand Up @@ -33,8 +33,12 @@ libcrmcluster_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la $(top_buil
libcrmcluster_la_DEPENDENCIES = $(top_builddir)/lib/common/libcrmcommon.la $(top_builddir)/lib/fencing/libstonithd.la

if BUILD_CS_SUPPORT
if BUILD_CS_PLUGIN
libcrmcluster_la_SOURCES += legacy.c
else
libcrmcluster_la_SOURCES += corosync.c
endif
endif

if BUILD_HEARTBEAT_SUPPORT
libcrmcluster_la_SOURCES += heartbeat.c
Expand Down

0 comments on commit 18e7801

Please sign in to comment.