在LINUX下实现HA的源代码

源代码在线查看: misc.c

软件大小: 1842 K
上传用户: hwyzy
关键词: LINUX 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				/* 				 * Copyright (C) 2004 Andrew Beekhof 				 * 				 * This program is free software; you can redistribute it and/or				 * modify it under the terms of the GNU General Public				 * License as published by the Free Software Foundation; either				 * version 2.1 of the License, or (at your option) any later version.				 * 				 * This software is distributed in the hope that it will be useful,				 * but WITHOUT ANY WARRANTY; without even the implied warranty of				 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU				 * General Public License for more details.				 * 				 * You should have received a copy of the GNU General Public				 * License along with this library; if not, write to the Free Software				 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA				 */				#include 				#include 								#include 								/*	A_LOG, A_WARN, A_ERROR	*/				enum crmd_fsa_input				do_log(long long action,				       enum crmd_fsa_cause cause,				       enum crmd_fsa_state cur_state,				       enum crmd_fsa_input current_input,				       void *data)				{					int log_type = LOG_DEBUG;									FNIN();									if(action & A_LOG) log_type = LOG_INFO;					if(action & A_WARN) log_type = LOG_WARNING;					if(action & A_ERROR) log_type = LOG_ERR;										cl_log(log_type,					       "[[FSA]] Input (%s) was received while in state (%s)",					       fsa_input2string(current_input),					       fsa_state2string(cur_state));										FNRET(I_NULL);				}							

相关资源