te_cib_conn, T_CIB_UPDATE_CONFIRM, te_update_confirm) != cib_ok) {
te_cib_conn, T_CIB_DIFF_NOTIFY, te_update_diff) != cib_ok) {
init_start(void){	int init_ok = TRUE;		init_client_ipc_comms(		CRM_SYSTEM_CRMD, subsystem_msg_dispatch,		(void*)process_te_message, &crm_ch);	if(crm_ch != NULL) {		send_hello_message(crm_ch, "1234", CRM_SYSTEM_TENGINE, "0", "1");	} else {		init_ok = FALSE;		crm_err("Could not connect to the CRMd");	}		if(init_ok) {		crm_debug_4("Creating CIB connection");		te_cib_conn = cib_new();		if(te_cib_conn == NULL) {			init_ok = FALSE;		}	}		if(init_ok) {		crm_debug_4("Connecting to the CIB");		if(cib_ok != te_cib_conn->cmds->signon(			   te_cib_conn, crm_system_name, cib_command)) {			init_ok = FALSE;		}	}	if(init_ok) {		crm_debug_4("Setting CIB notification callback");		if(te_cib_conn->cmds->add_notify_callback(			   te_cib_conn, T_CIB_UPDATE_CONFIRM,			   te_update_confirm) != cib_ok) {			crm_err("Could not set CIB notification callback");			init_ok = FALSE;		}	}	if(init_ok && ST_OK != stonithd_signon(crm_system_name)) {		crm_err("Could not sign up to stonithd");/*  		init_ok = FALSE;  */	}	if(init_ok && ST_OK != stonithd_set_stonith_ops_callback(		   tengine_stonith_callback, NULL)) {		crm_err("Could not set stonith callback");		stonithd_signoff();/*  		init_ok = FALSE; */	}	if(init_ok) {		IPC_Channel *fence_ch = stonithd_input_IPC_channel();		if(fence_ch == NULL) {		} else if(NULL == G_main_add_IPC_Channel(			G_PRIORITY_LOW, fence_ch, FALSE,			tengine_stonith_dispatch, NULL,			tengine_stonith_connection_destroy)) {			crm_err("Failed to add Fencing channel to our mainloop");			init_ok = FALSE;		}	}	if(init_ok) {		/* Create the mainloop and run it... */		crm_info("Starting %s", crm_system_name);		mainloop = g_main_new(FALSE);		g_main_run(mainloop);		return_to_orig_privs();		crm_info("Exiting %s", crm_system_name);			} else {		crm_warn("Initialization errors, %s not starting.",			 crm_system_name);	}	if(init_ok) {		return 0;	}	return 1;}