crm_debug("Finding our node name"); if ((ournode = hb_cluster->llc_ops->get_mynodeid(hb_cluster)) == NULL) { crm_err("get_mynodeid() failed"); return FALSE; } crm_info("hostname: %s", ournode);
register_with_ha(ll_cluster_t *hb_cluster, const char *client_name,		 gboolean (*dispatch_method)(int fd, gpointer user_data),		 void (*message_callback)(const struct ha_msg* msg,					  void* private_data),		 GDestroyNotify cleanup_method){	const char* ournode = NULL;	if(safe_val3(NULL, hb_cluster, llc_ops, errmsg) == NULL) {	  crm_crit("cluster errmsg function unavailable");	}	crm_info("Signing in with Heartbeat");	if (hb_cluster->llc_ops->signon(hb_cluster, client_name)!= HA_OK) {		crm_err("Cannot sign on with heartbeat");		if(safe_val3(NULL, hb_cluster, llc_ops, errmsg) == NULL) {			crm_crit("cluster errmsg function unavailable");		} else {			crm_err("REASON: %s",				hb_cluster->llc_ops->errmsg(hb_cluster));		}		return FALSE;	}  	crm_debug("Finding our node name");	if ((ournode =	     hb_cluster->llc_ops->get_mynodeid(hb_cluster)) == NULL) {		crm_err("get_mynodeid() failed");		return FALSE;	}	crm_info("hostname: %s", ournode);		crm_debug("Be informed of CRM messages");	if (hb_cluster->llc_ops->set_msg_callback(hb_cluster,						  "CRM",						  message_callback,						  hb_cluster)	    !=HA_OK){		crm_err("Cannot set CRM message callback");		if(safe_val3(NULL, hb_cluster, llc_ops, errmsg) == NULL) {			crm_crit("cluster errmsg function unavailable");		} else {			crm_err("REASON: %s",				hb_cluster->llc_ops->errmsg(hb_cluster));		}		return FALSE;	}	G_main_add_fd(G_PRIORITY_HIGH, 		      hb_cluster->llc_ops->inputfd(hb_cluster),		      FALSE, 		      dispatch_method, 		      hb_cluster,  // usrdata 		      cleanup_method);	return TRUE;    }