ソースを参照

temporary submit

zhangbo 3 年 前
コミット
e953cb3d34

BIN
app/NCP81111_Config/ncp81111_cfg


BIN
app/UpdateFirmware/updateFW_app


+ 1 - 4
app/bmc/msghndlr/PDKCmds.c

@@ -336,14 +336,11 @@ const CmdHndlrMap_T g_Storlead_CmdHndlr [] =
 {                                                              
     { CMD_GET_SYS_INFO,         PRIV_USER,      Storlead_GetSysInfo,        0xff,  0xAAAA ,0xFFFF},
     { CMD_GET_SENSOR_INFO,      PRIV_USER,      Storlead_GetSensorInfo,     0xff,  0xAAAA  ,0xFFFF},
-    { CMD_GET_SEL_ENTIRES,      PRIV_USER,      Storlead_GetSELEntires,     0xff,  0xAAAA  ,0xFFFF},
     { CMD_AUTHOR_VERIFY,        PRIV_USER,      Storlead_AuthorVerify,     0xff,  0xAAAA  ,0xFFFF},
     { CMD_GET_SENSOR_HISTORY,   PRIV_USER,      Storlead_GetSensorHistory,     0xff,  0xAAAA  ,0xFFFF},
     { CMD_GET_FAN_INFO,         PRIV_USER,      Storlead_GetFanInfo,         0xff,  0xAAAA  ,0xFFFF},
+    { CMD_SET_FAN_INFO,         PRIV_USER,      Storlead_SetFanInfo,         0xff,  0xAAAA  ,0xFFFF},
     { CMD_GET_ALLBLADE_INFO,        PRIV_USER,      Storlead_getAllBladeStatus,         0xff,  0xAAAA  ,0xFFFF},
-    //{ CMD_SET_MANAGE_FN,         PRIV_USER,      Storlead_SetBladeManageFn,         0xff,  0xAAAA  ,0xFFFF},     { CMD_SET_FAN_INFO,         PRIV_USER,      Storlead_SetFanInfo,         0xff,  0xAAAA  ,0xFFFF},
-    //{ CMD_GET_MANAGE_FN,         PRIV_USER,      Storlead_GetBladeManageFn,         0xff,  0xAAAA  ,0xFFFF},
-    { CMD_GET_CHASSIS_INFO,      PRIV_USER,      Storlead_GetChassisInfo,         0xff,  0xAAAA  ,0xFFFF},
     { CMD_RESTORE_FACTORY_SET,      PRIV_USER,      Storlead_RestoreFactorSettings,         0xff,  0xAAAA  ,0xFFFF},
     { CMD_GET_LAN_INFO,      PRIV_USER,      Storlead_GetLanInfo,         0xff,  0xAAAA  ,0xFFFF},
     { CMD_SET_LAN_INFO,      PRIV_USER,      Storlead_SetLanInfo,         0xff,  0xAAAA  ,0xFFFF},

+ 0 - 73
app/bmc/msghndlr/Storlead/Storlead.c

@@ -272,60 +272,6 @@ int  Storlead_GetSensorInfo(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
     return sizeof(StorleadGetSensorInfoRes_T);
 }
 
-
-/*
-*@fn AMIGetSELEntires
-*@param This function retrieves the SEL entries
-*@return Returns CC_NORMAL
-*/
-#define MAX_FULL_SEL_ENTRIES 900    //18*50=900, 50个SEL Entry, 每个18字节
-
-int Storlead_GetSELEntires(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes)
-{
-    // AMIGetSELEntriesReq_T *pAMIGetSelEntriesReq = (AMIGetSELEntriesReq_T *)pReq;
-    // AMIGetSELEntriesRes_T *pAMIGetSelEntiresRes = (AMIGetSELEntriesRes_T *)pRes;
-    // SELRepository_T *m_sel = NULL;
-    // uint16_t NumRecords = 0;
-
-    
-    //  m_sel = (SELRepository_T*)g_BMCInfo.pSEL;
-    //  NumRecords = m_sel->NumRecords;
-
-    // if(((NumRecords - pAMIGetSelEntriesReq->Noofentretrieved) * sizeof(SELRec_T)) < MAX_FULL_SEL_ENTRIES)
-    // {
-    //     pAMIGetSelEntiresRes->Status = FULL_SEL_ENTRIES;
-    //     pAMIGetSelEntiresRes->Noofentries = NumRecords - pAMIGetSelEntriesReq->Noofentretrieved;
-    // }
-    // else if(NumRecords == SEL_EMPTY_REPOSITORY)
-    // {
-    //     pAMIGetSelEntiresRes->CompletionCode = OEMCC_SEL_EMPTY_REPOSITORY;
-    //     return sizeof(*pRes);
-    // }
-    // else if (NumRecords < pAMIGetSelEntriesReq->Noofentretrieved)
-    // {
-    //     pAMIGetSelEntiresRes->CompletionCode = OEMCC_SEL_CLEARED;
-    //     return sizeof(*pRes);
-    // }
-    // else
-    // {
-    //     pAMIGetSelEntiresRes->Status = PARTIAL_SEL_ENTRIES;
-    //     pAMIGetSelEntiresRes->Noofentries = ((MAX_FULL_SEL_ENTRIES - sizeof(AMIGetSELEntriesRes_T))/sizeof(SELRec_T));
-    // }
-
-
-   
-    // memcpy((uint8_t*)(pAMIGetSelEntiresRes + 1),(uint8_t*)&m_sel->SELRecord[pAMIGetSelEntriesReq->Noofentretrieved],
-    //           sizeof(SELRec_T)*pAMIGetSelEntiresRes->Noofentries);
-  
-
-    // pAMIGetSelEntiresRes->LastRecID = m_sel->LastRecID;
-
-    // pAMIGetSelEntiresRes->CompletionCode = CC_NORMAL;
-
-    // return sizeof(AMIGetSELEntriesRes_T) + (sizeof(SELRec_T) * pAMIGetSelEntiresRes->Noofentries);
-    return 1;
-}
-
 int Storlead_AuthorVerify(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes)
 {
     AuthorVerify_T *pAuthorVerify = (AuthorVerify_T *)pReq;
@@ -542,25 +488,6 @@ int Storlead_getAllBladeStatus(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes)
     return 1+(BLADE_NUMBERS*sizeof(BladeStatus_T));
 }
 
-int Storlead_GetChassisInfo(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes)
-{
-    /*
-    typedef struct{
-    uint8_t slotNum; //total slot numbers of chassis.
-    uint8_t supportChassisManageFn;
-    uint8_t chassisManageFnEnable;
-    uint8_t curIndex;
-} OemChassisInfo_T;
-*/
-    pRes[0] = CC_NORMAL;
-    pRes[1] = BLADE_NUMBERS;
-    pRes[2] = g_BMCInfo.isChMC;
-    pRes[3] = 0;//g_BMCInfo.BladeManageEn;  //机箱管理使能,该字段废弃了。
-    pRes[4] = g_BMCInfo.IndexInChassis;
-    return 5;
-}
-
-
 int Storlead_RestoreFactorSettings(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes)
 {
     int i;

+ 0 - 4
app/bmc/msghndlr/Storlead/Storlead.h

@@ -5,15 +5,11 @@
 
 int  Storlead_GetSysInfo(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes);
 int  Storlead_GetSensorInfo(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes);
-int  Storlead_GetSELEntires(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_AuthorVerify(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_GetSensorHistory(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_GetFanInfo(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_SetFanInfo(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_getAllBladeStatus(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
-//int Storlead_SetBladeManageFn(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
-//int Storlead_GetBladeManageFn(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
-int Storlead_GetChassisInfo(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_RestoreFactorSettings(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_GetLanInfo(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);
 int Storlead_SetLanInfo(uint8_t *pReq, uint8_t ReqLen, uint8_t *pRes);

+ 0 - 4
app/bmc/msghndlr/cmdselect.c

@@ -800,15 +800,11 @@ const NetFnCmds_T g_Storlead [] =
 	/*------------------------- IPM Device Commands --------------------------------------*/
 	{ CMD_GET_SYS_INFO          ,ENABLED},
 	{ CMD_GET_SENSOR_INFO          ,ENABLED},
-	{ CMD_GET_SEL_ENTIRES          ,ENABLED},
 	{ CMD_AUTHOR_VERIFY          ,ENABLED},
 	{ CMD_GET_SENSOR_HISTORY          ,ENABLED},	
 	{ CMD_GET_FAN_INFO          ,ENABLED},	
 	{ CMD_SET_FAN_INFO          ,ENABLED},	
 	{ CMD_GET_ALLBLADE_INFO          ,ENABLED},	
-//	{ CMD_SET_MANAGE_FN          ,ENABLED},	
-//	{ CMD_GET_MANAGE_FN          ,ENABLED},	
-	{ CMD_GET_CHASSIS_INFO          ,ENABLED},	
 	{ CMD_RESTORE_FACTORY_SET          ,ENABLED},	
 	{ CMD_GET_LAN_INFO          ,ENABLED},	
 	{ CMD_SET_LAN_INFO          ,ENABLED},	

+ 0 - 4
app/common_include/com_IPMI_Storlead.h

@@ -3,15 +3,11 @@
 
 #define CMD_GET_SYS_INFO   		0x0
 #define CMD_GET_SENSOR_INFO   	0x1
-#define CMD_GET_SEL_ENTIRES		0x2
 #define CMD_AUTHOR_VERIFY 		0x3
 #define CMD_GET_SENSOR_HISTORY  0x4
 #define CMD_GET_FAN_INFO		0x5
 #define CMD_SET_FAN_INFO		0x6
 #define CMD_GET_ALLBLADE_INFO	0x7
-//#define CMD_SET_MANAGE_FN		0x8
-//#define CMD_GET_MANAGE_FN		0x9
-#define CMD_GET_CHASSIS_INFO	0xA
 #define CMD_RESTORE_FACTORY_SET 0xB
 #define CMD_GET_LAN_INFO		0xC
 #define CMD_SET_LAN_INFO		0xD

+ 0 - 5
app/goahead-3.6.5/src/goahead.c

@@ -179,14 +179,9 @@ websDefineAction("buy", buy);
 //dashboard
 websDefineAction("getDeviceInfo", getDeviceInfo);
 websDefineAction("getSysInfo", getSysInfo);
-websDefineAction("getCardInfo", getCardInfo);
 websDefineAction("getSensorInfo", getSensorInfo);
-websDefineAction("getChassisInfo", getChassisInfo);
-websDefineAction("getBladeManage", getBladeManage);
-websDefineAction("setBladeManage", setBladeManage);
 websDefineAction("getAllBladeInfo", getAllBladeInfo);
 
-
 //remote control
 websDefineAction("chassisPwrCtrl", chassisPwrCtrl);
 websDefineAction("getChassisStatus", getChassisStatus);

+ 0 - 10
app/goahead-3.6.5/src/libipmi/inc/libipmi_StorDevice.h

@@ -155,16 +155,6 @@ uint8_t libipmi_GetBits(uint8_t orig, uint8_t startbit, uint8_t endbit);
 				FRUWriteRes_T* pFRUWriteResData,
 				int timeout);
 
-  // uint16_t LIBIPMI_HL_GetAllFRUDevices(IPMI20_UDS_SESSION_T *pUDSSession,
-		// 		uint8_t *pFRUIDs,
-		// 		uint8_t *pFRUNames,
-		// 		uint8_t *nFRUs,
-		// 		int timeout);
-
-  uint16_t Storlead_GetAllSelEntriesWithSensorNames(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t IpmbAddr,
-	SELEventRecordWithSensorName_T *pSELEntriesBuffer,
-	int timeout);
-
   uint16_t IPMICMD_ClearSEL(IPMI20_UDS_SESSION_T *pUDSSession,
 				int timeout);
 

+ 0 - 268
app/goahead-3.6.5/src/libipmi/src/libipmi_StorDevice.c

@@ -696,274 +696,6 @@ uint16_t LIBIPMI_HL_GetSensorName(IPMI20_UDS_SESSION_T *pUDSSession,
 	return wRet;
 }
 
-/*this function wants to be nice to all nice people in the world who display
-sensor information. Instead of letting them go nuts getting all sel entires first
-an then looping thru all sel entires to go get all the sensor names and then each time to
-get a sensor name read SDR
-it just does that for them
-GetAllSelEntires
-Also GetAllSDR stuff once
-then loop and fill it all up internally*/
-uint16_t Storlead_GetAllSelEntriesWithSensorNames(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t IpmbAddr,
-					SELEventRecordWithSensorName_T *pSELEntriesBuffer,
-					int timeout)
-{
-	uint16_t wRet = 0;
-	SDRRepositoryAllocInfo_T SDRAllocationInfo;
-	SDRRepositoryInfo_T SDRReposInfo;
-	int MaxSDRLen = 0;
-	int i,SDRCount = 0;
-	uint8_t *pSDRBuff = NULL;
-	SDRHeader *pSDRHeader = NULL;
-	uint8_t *pSDRStart = NULL;
-	uint32_t nNumSelEntries = 0;
-	int q = 0;
-
-	
-	/***********************************Get all Sel Entries now*********************************************/
-	/* We want to read full records */
-	//DataLen = sizeof(GetSELRes_T) + sizeof(SELEventRecord_T);
-
-	wRet = Storlead_AMIGetSELEntires(pUDSSession, IpmbAddr, pSELEntriesBuffer,&nNumSelEntries,timeout);
-	if(wRet != LIBIPMI_E_SUCCESS)
-	{
-		printf("LIBIPMI_HL_AMIGetSELEntires : Error getting SEL Entries \n");
-		return wRet;
-	}
-
-	
-	/*************************************Get The SDR once so that we can get sensor names*******************/
-	/* Get max buffer size to be allocated to read all SDRs in the system */
-	if(IpmbAddr == 0x20)
-	{
-		wRet = IPMICMD_GetSDRRepositoryAllocInfo(pUDSSession, &SDRAllocationInfo, timeout);
-	}
-	else
-	{
-		wRet = IPMC_GetSDRRepositoryAllocInfo(pUDSSession, IpmbAddr, &SDRAllocationInfo, timeout);	
-	}
-	if( wRet != 0 )
-	{
-		printf("Error getting SDR Repository Allocation Info\n");
-		return wRet;
-	}
-	printf("---> NumAllocUnits: %d, AllocUnitSize: %d, NumFreeAllocUnits: %d, LargestFreeBlock: %d, MaxRecSize: %d\n", \
-		SDRAllocationInfo.NumAllocUnits, SDRAllocationInfo.AllocUnitSize, SDRAllocationInfo.NumFreeAllocUnits, \
-		SDRAllocationInfo.LargestFreeBlock, SDRAllocationInfo.MaxRecSize);
-
-	/* Get repository information */
-	if(IpmbAddr == 0x20)
-	{
-		wRet = IPMICMD_GetSDRRepositoryInfo(pUDSSession, &SDRReposInfo,timeout);
-	}
-	else
-	{
-		wRet = IPMC_GetSDRRepositoryInfo(pUDSSession, IpmbAddr, &SDRReposInfo,timeout);	
-	}
-	if( wRet != 0 )
-	{
-		printf("Error getting SDR Repository Info\n");
-		return wRet;
-	}
-
-	/* Determine max SDR entry length */
-	MaxSDRLen = SDRAllocationInfo.MaxRecSize *  ( SDRAllocationInfo.AllocUnitSize );
-
-	/* Determine total number of SDRs stored */
-	SDRCount =  ( SDRReposInfo.RecCt );
-	printf("---> SDRCount: %d, MaxSDRLen: %d\n", SDRCount, MaxSDRLen);
-
-	/* Allocate the buffer */
-	pSDRBuff = (uint8_t *) walloc(MaxSDRLen * SDRCount);
-	if(!pSDRBuff)
-	{
-		printf("Error allocating memopry for SDRs in GetAllEventsWithSensorNames\n");
-		wRet = STATUS_CODE(IPMI_ERROR_FLAG,CC_OUT_OF_SPACE);
-		return wRet;
-	}
-	pSDRStart = pSDRBuff;
-
-	/* Call the function to read all the SDRs into this buffer */
-	wRet = Storlead_GetAllSDRs(pUDSSession, IpmbAddr, 
-                                     pSDRBuff,(MaxSDRLen * SDRCount),
-                                     timeout*4);
-
-	/*************************************Get The SDR once so that we can get sensor names*******************/
-	/******************Now parse through sensor headers and get names corresponding to each event************/
-	for(q=0;q<nNumSelEntries;q++)
-	{
-
-		strcpy((char*)pSELEntriesBuffer[q].SensorName,(char*)"Unknown");
-
-		pSDRBuff = pSDRStart;
-		for( i = 0; i < SDRCount; i++)
-		{
-			pSDRHeader = (SDRHeader *) pSDRBuff;
-			if((pSDRHeader->RecordType >= 0x01) && (pSDRHeader->RecordType <= 0x03))
-			{
-				/* Compare SlaveAdd and LUNid fields */
-				uint8_t *pTmp = pSDRBuff + sizeof(SDRHeader);
-				uint8_t len = 0;
-
-
-
-				if((pSELEntriesBuffer[q].EventRecord.EvtRecord.GenID[0] == *pTmp) && (pSELEntriesBuffer[q].EventRecord.EvtRecord.GenID[1] == *(pTmp+1)))
-				{
-
-					/* Now compare the sensor number */
-					if(pSELEntriesBuffer[q].EventRecord.EvtRecord.SensorNum == *(pTmp+2))
-					{
-						/* Get the Name and return */
-						if(pSDRHeader->RecordType == 0x01)
-							pTmp = pSDRBuff + sizeof(SDRHeader) + 42;
-						else if(pSDRHeader->RecordType == 0x02)
-							pTmp = pSDRBuff + sizeof(SDRHeader) + 26;
-						else
-							pTmp = pSDRBuff + sizeof(SDRHeader) + 11;
-
-						len = GetBits(*pTmp,5,0);
-						if(len)
-						{
-							pTmp++;
-
-							memcpy(pSELEntriesBuffer[q].SensorName,pTmp,len);
-							pSELEntriesBuffer[q].SensorName[len] = 0;
-
-						}
-						else
-							strcpy((char*)pSELEntriesBuffer[q].SensorName,(char*)"Unknown");
-					}
-				}
-			}
-			pSDRBuff += MaxSDRLen;
-		}
-	}
-	wfree(pSDRStart);
-	return wRet;
-}
-
-uint16_t IPMC_GetAllSelEntriesWithSensorNames(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t IpmbAddr,
-					SELEventRecordWithSensorName_T *pSELEntriesBuffer,
-					int timeout)
-{
-	uint16_t wRet = 0;
-	SDRRepositoryAllocInfo_T SDRAllocationInfo;
-	SDRRepositoryInfo_T SDRReposInfo;
-	int MaxSDRLen = 0;
-	int i,SDRCount = 0;
-	uint8_t *pSDRBuff = NULL;
-	SDRHeader *pSDRHeader = NULL;
-	uint8_t *pSDRStart = NULL;
-	uint32_t nNumSelEntries = 0;
-	int q = 0;
-
-	
-	/***********************************Get all Sel Entries now*********************************************/
-	/* We want to read full records */
-	//DataLen = sizeof(GetSELRes_T) + sizeof(SELEventRecord_T);
-
-	wRet = Storlead_AMIGetSELEntires(pUDSSession, 0x20, pSELEntriesBuffer,&nNumSelEntries,timeout);
-	if(wRet != LIBIPMI_E_SUCCESS)
-	{
-		printf("LIBIPMI_HL_AMIGetSELEntires : Error getting SEL Entries \n");
-		return wRet;
-	}
-
-	
-	/*************************************Get The SDR once so that we can get sensor names*******************/
-	/* Get max buffer size to be allocated to read all SDRs in the system */
-	wRet = IPMICMD_GetSDRRepositoryAllocInfo(pUDSSession, &SDRAllocationInfo, timeout);
-	if( wRet != 0 )
-	{
-		printf("Error getting SDR Repository Allocation Info\n");
-		return wRet;
-	}
-	printf("---> NumAllocUnits: %d, AllocUnitSize: %d, NumFreeAllocUnits: %d, LargestFreeBlock: %d, MaxRecSize: %d\n", \
-		SDRAllocationInfo.NumAllocUnits, SDRAllocationInfo.AllocUnitSize, SDRAllocationInfo.NumFreeAllocUnits, \
-		SDRAllocationInfo.LargestFreeBlock, SDRAllocationInfo.MaxRecSize);
-
-	/* Get repository information */
-	wRet = IPMICMD_GetSDRRepositoryInfo(pUDSSession, &SDRReposInfo,timeout);
-	if( wRet != 0 )
-	{
-		printf("Error getting SDR Repository Info\n");
-		return wRet;
-	}
-
-	/* Determine max SDR entry length */
-	MaxSDRLen = SDRAllocationInfo.MaxRecSize *  ( SDRAllocationInfo.AllocUnitSize );
-
-	/* Determine total number of SDRs stored */
-	SDRCount =  ( SDRReposInfo.RecCt );
-	printf("---> SDRCount: %d, MaxSDRLen: %d\n", SDRCount, MaxSDRLen);
-
-	/* Allocate the buffer */
-	pSDRBuff = (uint8_t *) walloc(MaxSDRLen * SDRCount);
-	if(!pSDRBuff)
-	{
-		printf("Error allocating memopry for SDRs in GetAllEventsWithSensorNames\n");
-		wRet = STATUS_CODE(IPMI_ERROR_FLAG,CC_OUT_OF_SPACE);
-		return wRet;
-	}
-	pSDRStart = pSDRBuff;
-
-	/* Call the function to read all the SDRs into this buffer */
-	wRet = Storlead_GetAllSDRs(pUDSSession, 0x20, 
-                                     pSDRBuff,(MaxSDRLen * SDRCount),
-                                     timeout*4);
-
-	/*************************************Get The SDR once so that we can get sensor names*******************/
-	/******************Now parse through sensor headers and get names corresponding to each event************/
-	for(q=0;q<nNumSelEntries;q++)
-	{
-
-		strcpy((char*)pSELEntriesBuffer[q].SensorName,(char*)"Unknown");
-
-		pSDRBuff = pSDRStart;
-		for( i = 0; i < SDRCount; i++)
-		{
-			pSDRHeader = (SDRHeader *) pSDRBuff;
-			if((pSDRHeader->RecordType >= 0x01) && (pSDRHeader->RecordType <= 0x03))
-			{
-				/* Compare SlaveAdd and LUNid fields */
-				uint8_t *pTmp = pSDRBuff + sizeof(SDRHeader);
-				uint8_t len = 0;
-
-
-
-				if((pSELEntriesBuffer[q].EventRecord.EvtRecord.GenID[0] == *pTmp) && (pSELEntriesBuffer[q].EventRecord.EvtRecord.GenID[1] == *(pTmp+1)))
-				{
-					/* Now compare the sensor number */
-					if(pSELEntriesBuffer[q].EventRecord.EvtRecord.SensorNum == *(pTmp+2))
-					{
-						/* Get the Name and return */
-						if(pSDRHeader->RecordType == 0x01)
-							pTmp = pSDRBuff + sizeof(SDRHeader) + 42;
-						else if(pSDRHeader->RecordType == 0x02)
-							pTmp = pSDRBuff + sizeof(SDRHeader) + 26;
-						else
-							pTmp = pSDRBuff + sizeof(SDRHeader) + 11;
-
-						len = GetBits(*pTmp,5,0);
-						if(len)
-						{
-							pTmp++;
-
-							memcpy(pSELEntriesBuffer[q].SensorName,pTmp,len);
-							pSELEntriesBuffer[q].SensorName[len] = 0;
-
-						}
-						else
-							strcpy((char*)pSELEntriesBuffer[q].SensorName,(char*)"Unknown");
-					}
-				}
-			}
-			pSDRBuff += MaxSDRLen;
-		}
-	}
-	wfree(pSDRStart);
-	return wRet;
-}
 /*****************************************************************************
 	Field Replacement Unit (FRU)
 ******************************************************************************/

+ 0 - 234
app/goahead-3.6.5/src/libipmi/src/libipmi_storlead_OEM.c

@@ -199,33 +199,6 @@ uint16_t IPMC_GetSysInfo( IPMI20_UDS_SESSION_T *pUDSSession, uint8_t IpmbAddr, S
 	return 0;
 }
 
-// /************************************************* new add **********************************************************************/
-int LIBIPMI_HL_GetChassisInfo(IPMI20_UDS_SESSION_T *pUDSSession, OemChassisInfo_T* pChassisInfo, int timeout)
-{
-	uint8_t pRes[10];
-	int wRet = 0;
-	uint32_t	dwResLen;
-	wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,  
-							NETFNLUN_IPMI_STORLEAD, CMD_GET_CHASSIS_INFO,
-							NULL, 0,
-							(uint8_t*)pRes,  &dwResLen,
-							timeout);
-	if(( wRet != 0 ) || (pRes[0] != 0))
-	{
-		printf("Error getting Blade Status Info\n");
-		memset(pChassisInfo, 0, sizeof(OemChassisInfo_T));
-		pChassisInfo->slotNum = BLADE_NUMBERS;
-		pChassisInfo->curIndex = 0;
-		return -1;
-	}
-		
-	pChassisInfo->slotNum = pRes[1];
-	pChassisInfo->isChMC = pRes[2];
-	pChassisInfo->chassisManageFnEnable = pRes[3];	//该字段废弃。
-	pChassisInfo->curIndex = pRes[4];
-	return 0;
-}
-
 int LIBIPMI_HL_GetAllBladeStatus(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t chassisManageEn, BladeStatus_T *BladeStatus, int timeout)
 {
 	int wRet = 0;
@@ -301,213 +274,6 @@ int IPMC_GetFanInfo(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t IpmbAddr, FanInfo
 	return 0;
 }
 
-/*
-*@fn IPMICMD_AMIGetSELEntires
-*@brief
-*@param pSession - IPMI Session Handle
-*@param pAMIGetSelEntriesReq - Pointer to the request of AMI Get SEL Entries command
-*@param pAMIGetSelEntiresRes - Pointer to the response of AMI Get SEL Entries command
-*@param timeout - Timeout Value
-**/
-uint16_t IPMICMD_AMIGetSELEntires(IPMI20_UDS_SESSION_T *pUDSSession,AMIGetSELEntriesReq_T *pAMIGetSelEntriesReq,
-											   AMIGetSELEntriesRes_T *pAMIGetSelEntiresRes,int timeout)
-{
-	uint16_t wRet;
-	uint32_t dwResLen;
-	dwResLen = sizeof(AMIGetSELEntriesRes_T);
-	
-	wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
-						NETFNLUN_IPMI_STORLEAD, CMD_GET_SEL_ENTIRES,
-						(uint8_t *)pAMIGetSelEntriesReq, sizeof(AMIGetSELEntriesReq_T),
-						(uint8_t*)pAMIGetSelEntiresRes, &dwResLen,
-						timeout);
-	
-	return (wRet);
-}
-
-uint16_t IPMC_AMIGetSELEntires(IPMI20_UDS_SESSION_T *pUDSSession,  uint8_t IpmbAddr, AMIGetSELEntriesReq_T *pAMIGetSelEntriesReq,
-											   AMIGetSELEntriesRes_T *pAMIGetSelEntiresRes,int timeout)
-{
-	int wRet = 0;
-	uint32_t	dwResLen;
-	uint8_t 	Req[50] = {0};
-	uint8_t		Res[50] = {0};
-
-	//first do a SEL reservation
-	Req[0] = 0x40;	//Track | channel 0
-	Req[1] = IpmbAddr;
-	Req[2] = NETFNLUN_IPMI_STORLEAD;
-	Req[3] = 0x100 - (Req[1] + Req[2])&0xff;	//checksum1
-	Req[4] = 0x20;
-	Req[5] = 0x10;
-	Req[6] = CMD_GET_SEL_ENTIRES;	
-	Req[7] = pAMIGetSelEntriesReq->Noofentretrieved&0xff;
-	Req[8] = (pAMIGetSelEntriesReq->Noofentretrieved>>8)&0xff;
-	Req[9] = (pAMIGetSelEntriesReq->Noofentretrieved>>16)&0xff;
-	Req[10] = (pAMIGetSelEntriesReq->Noofentretrieved>>24)&0xff;
-	Req[11] = 0x100 - (Req[4] + Req[5] + Req[6] + Req[7] + Req[8] + Req[9] + Req[10])&0xff;
-
-	wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,  
-							NETFNLUN_IPMI_APP, CMD_SEND_MSG,
-							Req, 12,
-							Res,  &dwResLen,
-							timeout);
-
-	if((wRet != 0) || (Res[6] != 0))
-	{
-		printf("get sel entires failed!\n");
-		memset(pAMIGetSelEntiresRes, 0, sizeof(AMIGetSELEntriesRes_T));
-		return -1;
-	}
-
-	memcpy(pAMIGetSelEntiresRes, &Res[6], sizeof(AMIGetSELEntriesRes_T));
-	return (wRet);
-}
-
-
-/*
-*@fn LIBIPMI_HL_AMIGetSELEntires
-*@brief High Level command to retrieve the total SEL Entries
-*@param pSession - IPMI Session Handle
-*@param pSELEntriesBuffer - Pointer to hold the retrieved SEL Entries
-*@param nNumSelEntries - Pointer which hold the no. of SEL Entries retrieved
-*@param timeout - Timeout Value
-*@return Returns LIBIPMI_E_SUCCESS on success
-*@return Returns proper completion code on error
-**/
-uint16_t Storlead_AMIGetSELEntires(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t IpmbAddr,
-	SELEventRecordWithSensorName_T *pSELEntriesBuffer,uint32_t *nNumSelEntries,int timeout)
-{
-	AMIGetSELEntriesReq_T pAMIGetSelEntriesReq = {0};
-	AMIGetSELEntriesRes_T *pAMIGetSelEntiresRes;
-	SELEventRecordWithSensorName_T *CircSELEntries;
-	uint8_t *SELEntries;
-	uint16_t wRet = 0;
-	int j=0;
-	uint16_t i=0,recindex=0;
-	uint16_t LastRecID = 0xFFFF,MaxSELEntries=0;
-	uint32_t max_sel_len = MAX_SEL_RECORD*sizeof(SELRec_T) + sizeof(AMIGetSELEntriesRes_T) + 256;//margin
-	
-	SELEntries = (uint8_t *)walloc(max_sel_len);
-	if(SELEntries == NULL)
-	{
-		printf("Memory allocation error in LIBIPMI_HL_AMIGetSELEntires \n");
-		wRet = 0xFF;
-		return wRet;
-	}
-	
-	memset(SELEntries,0,max_sel_len);
-	pAMIGetSelEntiresRes = (AMIGetSELEntriesRes_T *)SELEntries;
-	
-	do
-	{
-		if(IpmbAddr == 0x20)
-		{
-			wRet = IPMICMD_AMIGetSELEntires(pUDSSession,&pAMIGetSelEntriesReq,(AMIGetSELEntriesRes_T *)SELEntries,timeout);
-		}
-		else
-		{
-			wRet = IPMC_AMIGetSELEntires(pUDSSession, IpmbAddr, &pAMIGetSelEntriesReq,(AMIGetSELEntriesRes_T *)SELEntries,timeout);
-		}
-		if(wRet == LIBIPMI_E_SUCCESS)
-		{
-			for(i = 0; i < pAMIGetSelEntiresRes->Noofentries; i++)
-			{
-				memcpy((uint8_t *)&pSELEntriesBuffer[i+*nNumSelEntries].EventRecord,&(SELEntries[sizeof(AMIGetSELEntriesRes_T) + (i * sizeof(SELRec_T))]),
-							   sizeof(SELRec_T));
-			}
-	
-			if(pAMIGetSelEntriesReq.Noofentretrieved == 0x00)
-			{
-				LastRecID = pAMIGetSelEntiresRes->LastRecID;
-			}
-	
-			if(pAMIGetSelEntiresRes->Status == FULL_SEL_ENTRIES)
-			{
-				*nNumSelEntries += pAMIGetSelEntiresRes->Noofentries;
-				break;
-			}
-			else
-			{
-				*nNumSelEntries += pAMIGetSelEntiresRes->Noofentries;
-				pAMIGetSelEntriesReq.Noofentretrieved = *nNumSelEntries;
-				memset(SELEntries,0,max_sel_len);
-				continue;
-			}
-		}
-		else if((wRet & 0xFF) == LIBIPMI_E_SEL_CLEARED)
-		{
-			memset(SELEntries,0,max_sel_len);
-			memset((uint8_t*)&pSELEntriesBuffer[0],0,sizeof(SELEventRecordWithSensorName_T) * *nNumSelEntries);
-			*nNumSelEntries =  pAMIGetSelEntriesReq.Noofentretrieved = 0;
-			continue;
-		}
-		else if((wRet & 0xFF)  == LIBIPMI_E_SEL_EMPTY)
-		{
-			/* Returning LIBIPMI_E_SUCCESS when sel repo is empty as
-				 per WebUI expectations. Will be removed once changes are made in WebUI*/
-			wRet = LIBIPMI_E_SUCCESS;
-			return wRet;
-		}
-		else
-		{
-			break;
-		}
-	}while(1);
-	
-	wfree(SELEntries);
-	
-	if(wRet == LIBIPMI_E_SUCCESS)
-	{
-		if(LastRecID != 0xFFFF)
-		{
-			if(LastRecID > MAX_SEL_RECORD)
-			{
-				for(i = 0; i < *nNumSelEntries; i++)
-				{
-					if(pSELEntriesBuffer[i].EventRecord.EvtRecord.hdr.ID == LastRecID)
-					{
-						recindex = i;
-						break;
-					}
-				}
-
-				/* Last Record is not found if reached till end of SEL Entries*/
-				if(i == *nNumSelEntries)
-				{
-					wRet = 0xFF;
-					return wRet;
-				}
-
-				/*SEL Records added lastely will be displayed first */
-				CircSELEntries = (SELEventRecordWithSensorName_T *)walloc (sizeof(SELEventRecordWithSensorName_T) * (*nNumSelEntries));
-				if(CircSELEntries != NULL)
-				{
-					memset(CircSELEntries,0,sizeof(SELEventRecordWithSensorName_T) * (*nNumSelEntries));
-					j = recindex; i = 0;
-					while(j >= 0)
-					{
-						memcpy((uint8_t *)&CircSELEntries[i],(uint8_t*)&pSELEntriesBuffer[j],sizeof(SELEventRecordWithSensorName_T));
-						j--;i++;
-					}
-
-					for(j = recindex + 1,i = 1; j < *nNumSelEntries; j++,i++)
-					{
-						memcpy((uint8_t*)&CircSELEntries[j],(uint8_t*)&pSELEntriesBuffer[*nNumSelEntries - i ],sizeof(SELEventRecordWithSensorName_T));
-					}
-
-					for(i = 0,j=1;i< *nNumSelEntries; i++,j++)
-					{
-						memcpy((uint8_t*)&pSELEntriesBuffer[i],(uint8_t*)&CircSELEntries[*nNumSelEntries - j],sizeof(SELEventRecordWithSensorName_T));
-					}
-					wfree(CircSELEntries);
-				}
-			}
-		}
-	}
-	return (wRet);
-}
-
 uint16_t IPMICMD_ResetBMC(IPMI20_UDS_SESSION_T *pUDSSession, int timeout)
 {
 	uint16_t wRet;

+ 3 - 0
app/goahead-3.6.5/src/runtime.c

@@ -1271,6 +1271,8 @@ PUBLIC int wfreeHandle(void *mapArg, int handle)
     ssize   *mp;
     int     len;
 
+
+    //printf("---> wfreeHandle handle = %d\n", handle);
     map = (void***) mapArg;
     assert(map);
     mp = &((*(ssize**)map)[-H_OFFSET]);
@@ -1299,6 +1301,7 @@ PUBLIC int wfreeHandle(void *mapArg, int handle)
             handle = len;
         }
     }
+
     return handle + 1;
 }
 

+ 9 - 4
app/goahead-3.6.5/src/socket.c

@@ -105,7 +105,7 @@ PUBLIC int socketListen(char *ip, int port, SocketAccept accept, int flags)
     if (port > SOCKET_PORT_MAX) {
         return -1;
     }
-    printf(">>>>>ip value is \n: %s", ip);
+    //printf(">>>>>ip value is \n: %s", ip);
     if ((sid = socketAlloc(ip, port, accept, flags)) < 0) {
         return -1;
     }
@@ -128,7 +128,7 @@ PUBLIC int socketListen(char *ip, int port, SocketAccept accept, int flags)
         socketFree(sid);
         return -1;
     }
-    printf("---> web socketListen.socket = %d\n", sp->sock);
+    //printf("---> web socketListen.socket = %d\n", sp->sock);
     socketHighestFd = max(socketHighestFd, sp->sock);
 
 #if ME_COMPILER_HAS_FCNTL
@@ -901,9 +901,12 @@ PUBLIC int socketAlloc(char *ip, int port, SocketAccept accept, int flags)
     WebsSocket    *sp;
     int         sid;
 
+
     if ((sid = wallocObject(&socketList, &socketMax, sizeof(WebsSocket))) < 0) {
         return -1;
     }
+
+    //printf("---> socketAlloc: sid = %d\n", sid);
     sp = socketList[sid];
     sp->sid = sid;
     sp->accept = accept;
@@ -943,8 +946,10 @@ PUBLIC void socketFree(int sid)
         if (shutdown(sp->sock, SHUT_RDWR) >= 0) {
             while (recv(sp->sock, buf, sizeof(buf), 0) > 0) {}
         }
-        printf("%s %d ---> closesocket %d\n", __FILE__, __LINE__, sp->sock);
+        
+        //printf("%s %d ---> closesocket header %d\n", __FILE__, __LINE__, sp->sock);
         closesocket(sp->sock);
+        //printf("%s %d ---> closesocket tail %d\n", __FILE__, __LINE__, sp->sock);
     }
     wfree(sp->ip);
     wfree(sp);
@@ -967,7 +972,7 @@ PUBLIC void socketFree(int sid)
  */
 WebsSocket *socketPtr(int sid)
 {
-    printf("?>>>>>>>>>>%d11\n", sid);
+    printf("---> socketPtr(): sid = %d, socketMax = %d\n", sid, socketMax);
     if (sid < 0 || sid >= socketMax || socketList[sid] == NULL) {
         assert(NULL);
         errno = EBADF;

+ 0 - 4
app/goahead-3.6.5/src/web_interface/inc/dashboard.h

@@ -7,15 +7,11 @@ void getDeviceInfo(Webs *wp);
 /*获取cpu信息*/
 void getSysInfo(Webs *wp);
 /*获取刀片信息*/
-void getCardInfo(Webs *wp);
 void getSensorInfo(Webs *wp);
 void actionTest(Webs *wp);
 void buy(Webs *wp);
 
-void getBladeManage(Webs *wp);
-void setBladeManage(Webs *wp);
 void getAllBladeInfo(Webs *wp);
-void getChassisInfo(Webs *wp);
 
 
 #endif /* __DASHBOARD_H__ */

+ 0 - 193
app/goahead-3.6.5/src/web_interface/src/dashboard.c

@@ -18,7 +18,6 @@ uint8_t gIPMBAddr[BLADE_NUMBERS] = {0x20, 0x84, 0x86, 0x88, 0x8A, 0x8C, 0x8E, 0x
 uint8_t gChassisManageEn = 0;
 /*获取设备信息*/
 void getDeviceInfo(Webs *wp){
-    printf("--->getDeviceInfo  wp.index = %d\n", wp->index);
     uint16_t    wRet = LIBIPMI_E_SUCCESS;
     GetDevIDRes_T   DeviceID;
     struct ifreq ifreq;
@@ -204,12 +203,6 @@ sys_info_end:
         cJSON_Delete(root);
 }
 
-
-/*获取刀片信息*/
-void getCardInfo(Webs *wp){
-
-}
-
 void getSensorInfo(Webs *wp){
     int         wRet;
     int         nSensors = 0;
@@ -526,189 +519,3 @@ void getAllBladeInfo(Webs *wp){
 
 }
 
-// void getAllBladeInfo(Webs *wp){
-//     uint16_t    wRet = LIBIPMI_E_SUCCESS;
-    
-//     IPMI20_UDS_SESSION_T    UDSSession;
-//     BladeStatus_T   *pBladeStatus = walloc(BLADE_NUMBERS*sizeof(BladeStatus_T));
-//     //Create session
-//     LIBIPMI_CreateSession(&UDSSession, DEFAULT_TIMEOUT);
-
-//     wRet = LIBIPMI_HL_GetAllBladeStatus(&UDSSession, gChassisManageEn, pBladeStatus, DEFAULT_TIMEOUT);
-//     if(wRet != 0)
-//     {
-//         printf("Get Blade status error!\n");
-//         websError(wp, 404, "Get Blade status error!");
-//         wfree(pBladeStatus);
-//         return;
-//     }
-//     //Close session
-//     LIBIPMI_CloseSession(&UDSSession );
-    
-//     char *pStr;
-//     cJSON * root =  cJSON_CreateObject();
-//     cJSON  *pJsonArry,*pJsonsub;
-//     pJsonArry=cJSON_CreateArray();   /*创建数组*/
-//     cJSON_AddItemToObject(root, "data", pJsonArry);//根节点下添加
-//     cJSON_AddStringToObject(root, "msg", "");
-//     cJSON_AddNumberToObject(root, "code", 200);
-
-//     int i;
-//     for(i=0;i<BLADE_NUMBERS;i++)
-//     {
-//         cJSON_AddItemToArray(pJsonArry,pJsonsub=cJSON_CreateObject()); /* 给创建的数组增加对对象*/
-//         cJSON_AddNumberToObject(pJsonsub, "present", pBladeStatus[i].present);  //0:不在位,1:在位
-//         cJSON_AddNumberToObject(pJsonsub, "status", pBladeStatus[i].healthStatus); //0:灰色, 1: 绿色 2:红色
-//         cJSON_AddNumberToObject(pJsonsub, "slot", pBladeStatus[i].slotID); 
-//         cJSON_AddNumberToObject(pJsonsub, "power", pBladeStatus[i].pwrStatus); 
-//         cJSON_AddStringToObject(pJsonsub, "name", pBladeStatus[i].bladeName); 
-//         cJSON_AddNumberToObject(pJsonsub, "isChMC", pBladeStatus[i].isChMC); 
-
-//         //将主模块的IPMB地址改成0x20
-//         if(pBladeStatus[i].isChMC)
-//         {
-//             gIPMBAddr[i] = 0x20;
-//             printf("Modify %d blade ipmb address to 0x20\n", i);
-//         }
-//     }
-  
-//     pStr = cJSON_PrintUnformatted(root);
-
-//     websSetStatus(wp, 200);
-//     websWriteHeaders(wp, -1, 0);
-//     websWriteEndHeaders(wp);
-//     websWrite(wp, "%s", pStr);
-//     websFlush(wp, 0);
-//     websDone(wp);
-//     printf("cJSON:%s\n", pStr);
-
-//     if(pStr)
-//         wfree(pStr);
-//     if(root)
-//         cJSON_Delete(root);
-//     if(pBladeStatus)
-//         wfree(pBladeStatus);
-
-// }
-
-//废弃
-void setBladeManage(Webs *wp){
-    char *strEnable = websGetVar(wp, "enable", NULL);
-
-    gChassisManageEn = atoi(strEnable);
-    
-    char *pStr;
-    cJSON * root =  cJSON_CreateObject();
-    cJSON * data =  cJSON_CreateObject();
-    cJSON_AddItemToObject(root, "data", data);//根节点下添加
-    cJSON_AddStringToObject(root, "msg", "");
-    cJSON_AddNumberToObject(root, "code", 200);
-    
-    pStr = cJSON_PrintUnformatted(root);
- 
-    websSetStatus(wp, 200);
-    websWriteHeaders(wp, -1, 0);
-    websWriteEndHeaders(wp);
-    websWrite(wp, "%s", pStr);
-    websFlush(wp, 0);
-    websDone(wp);
-    printf("cJSON:%s\n", pStr);
-
-    if(pStr)
-        wfree(pStr);
-    if(root)
-        cJSON_Delete(root);
-
-}
-
-//废弃
-void getBladeManage(Webs *wp){
-    char *pStr;
-    cJSON * root =  cJSON_CreateObject();
-    cJSON * data =  cJSON_CreateObject();
-    cJSON_AddItemToObject(root, "data", data);//根节点下添加
-    cJSON_AddStringToObject(root, "msg", "");
-    cJSON_AddNumberToObject(root, "code", 200);
-    cJSON_AddNumberToObject(data, "isEnable", gChassisManageEn);  //机箱管理功能是否已经打开    
-    
-    pStr = cJSON_PrintUnformatted(root);
-
-    websSetStatus(wp, 200);
-    websWriteHeaders(wp, -1, 0);
-    websWriteEndHeaders(wp);
-    websWrite(wp, "%s", pStr);
-    websFlush(wp, 0);
-    websDone(wp);
-    printf("cJSON:%s\n", pStr);
-
-    if(pStr)
-        wfree(pStr);
-    if(root)
-        cJSON_Delete(root);
-
-}
-
-
-void getChassisInfo(Webs *wp){
-    uint16_t    wRet = LIBIPMI_E_SUCCESS;
-    IPMI20_UDS_SESSION_T    UDSSession;
-    OemChassisInfo_T ChassisInfo;
-
-    //Create session
-    LIBIPMI_CreateSession(&UDSSession, DEFAULT_TIMEOUT);
-
-    wRet = LIBIPMI_HL_GetChassisInfo(&UDSSession, &ChassisInfo, DEFAULT_TIMEOUT);
-    if(wRet != 0)
-    {
-        websError(wp, 404, "Get Chassis Info Error!");
-        LIBIPMI_CloseSession(&UDSSession );
-        return;
-    }
-
-    //Close session
-    LIBIPMI_CloseSession(&UDSSession );
-
-    if(ChassisInfo.isChMC)
-    {
-        if(ChassisInfo.curIndex < BLADE_NUMBERS)
-        {
-            gIPMBAddr[ChassisInfo.curIndex] = 0x20;
-        }
-        else
-        {
-            printf("\n\n\nWarning: Invalid curIndex %d\n\n\n", ChassisInfo.curIndex);
-        }
-    }
-    else
-    {
-        gChassisManageEn = 0;
-    }
-
-
-    char *pStr;
-    cJSON * root =  cJSON_CreateObject();
-    cJSON * data =  cJSON_CreateObject();
-    cJSON_AddItemToObject(root, "data", data);//根节点下添加
-    cJSON_AddStringToObject(root, "msg", "");
-    cJSON_AddNumberToObject(root, "code", 200);
-
-    cJSON_AddNumberToObject(data, "slotNum", ChassisInfo.slotNum);    //机箱内一共有多少个槽位
-    cJSON_AddNumberToObject(data, "supportManage", ChassisInfo.isChMC); //是否支持机箱管理功能。 0:不支持, 1:支持
-    cJSON_AddNumberToObject(data, "ManageEn", gChassisManageEn);   //是否打开机箱管理功能。0:关闭, 1:打开
-    cJSON_AddNumberToObject(data, "curIndex", ChassisInfo.curIndex);   //当前刀片插在第几个槽位。
-    
-    pStr = cJSON_PrintUnformatted(root);
-    websSetStatus(wp, 200);
-    websWriteHeaders(wp, -1, 0);
-    websWriteEndHeaders(wp);
-    websWrite(wp, "%s", pStr);
-    websFlush(wp, 0);
-    websDone(wp);
-    printf("cJSON:%s\n", pStr);
-
-    if(pStr)
-        wfree(pStr);
-    if(root)
-        cJSON_Delete(root);
-
-}

+ 1 - 2
app/goahead-3.6.5/src/web_interface/src/fan.c

@@ -30,7 +30,7 @@ void getAllFanInfo(Webs *wp){
 	//Create session
     LIBIPMI_CreateSession(&UDSSession, DEFAULT_TIMEOUT);
 
-//    wp->index = TEST_INDEX;
+
     target_addr = gIPMBAddr[wp->index];
     if(target_addr == 0x20)
     {
@@ -118,7 +118,6 @@ void setFanInfo(Webs *wp){
 	//Create session
     LIBIPMI_CreateSession(&UDSSession, DEFAULT_TIMEOUT);
 
-//    wp->index = TEST_INDEX;
     target_addr = gIPMBAddr[wp->index];
     if(target_addr == 0x20)
     {

BIN
app/i2c_scan/i2c-scan


BIN
app/ipmitool-1.8.18/ipmitool


BIN
app/test_app/test_app