Browse Source

jimbo submit

zhangbo 3 năm trước cách đây
mục cha
commit
9f74ae51b5

+ 2 - 2
app/bmc/ipmb/IPMBIfc.c

@@ -191,7 +191,7 @@ void *IPMBIfcTask(void *Param)
 
                 int i;
                 for(i=0;i<RcvMsgPkt.Size;i++)
-                    printf("%#x ", RcvMsgPkt.Data[i]);
+                    printf("%02x ", RcvMsgPkt.Data[i]);
                 printf("\n");
 
                 if (RetVal < 0)
@@ -478,7 +478,7 @@ static void* RecvIPMBPkt (void *Param)
                 printf("\nSecRx: ");
 
             for(cnt=0;cnt < IPMBReqPkt.Size; cnt++)
-                printf("%#x ", IPMBReqPkt.Data[cnt]);
+                printf("%02x ", IPMBReqPkt.Data[cnt]);
             printf("\n");
 
             /* Post the IPMB Request message to IPMBIfc Queue */

+ 1 - 1
app/bmc/msghndlr/App/AppDevice/AppDevice.c

@@ -889,7 +889,7 @@ SendMessage ( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
    	printf("\n");
 #endif
 
-    printf("---> curchannel: %d, Channel: %d\n", *curchannel, Channel);
+//    printf("---> curchannel: %d, Channel: %d\n", *curchannel, Channel);
 
     if((Channel == PRIMARY_IPMB_CHANNEL) && g_BMCInfo.IpmiConfig.PrimaryIPMBSupport == 1)
     {

+ 8 - 8
app/bmc/msghndlr/MsgHndlrTask.c

@@ -270,7 +270,7 @@ ValidateMsgHdr (MsgPkt_T* pReq)
 				 }
 						
 				 /* Post the data to Destination Interface queue */
-				 printf("===> ValidateMsgHdr post message to %d\n", Queuefd);
+//				 printf("===> ValidateMsgHdr post message to %d\n", Queuefd);
 				 PostMsg (Queuefd, pReq);
 
 				 m_PendingBridgedResTbl[PBTbl][SeqNum].Used = FALSE;
@@ -396,7 +396,7 @@ ProcessIPMIReq (MsgPkt_T* pReq, MsgPkt_T* pRes)
 	//prepare response data for send message command
 	if( (CMD_SEND_MSG == pReq->Cmd) && (NETFN_APP == pReq->NetFnLUN >> 2))
 	{
-		printf("log 4, size %d, Channel %d\n",pRes->Size, pRes->Channel);
+//		printf("log 4, size %d, Channel %d\n",pRes->Size, pRes->Channel);
 		int Offset = 0;
 		uint8_t SeqNum = g_BMCInfo.SendMsgSeqNum;
 		if ((0 == pRes->Size) &&
@@ -707,12 +707,12 @@ void RespondSendMessage ( MsgPkt_T* pReq, uint8_t Status)
 			 m_PendingBridgedResTbl[PBTbl][SeqNum].ResDataOk = 0;
 		 }
 		 
-		 /* Post the data to Destination Interface queue */
-		 int i;
-		 printf("===> RespondSendMessage post to %d: ", QueueFd);
-		 for(i=0;i<ResPkt.Size;i++)
-		 	printf("%#x ", ResPkt.Data[i]);
-		 printf("\n");
+		 // /* Post the data to Destination Interface queue */
+		 // int i;
+		 // printf("===> RespondSendMessage post to %d: ", QueueFd);
+		 // for(i=0;i<ResPkt.Size;i++)
+		 // 	printf("%#x ", ResPkt.Data[i]);
+		 // printf("\n");
 		 PostMsg (QueueFd, &ResPkt);
 	}
 }

+ 2 - 2
app/common_include/com_IPMIDefs.h

@@ -52,10 +52,10 @@
 
 #define MAX_STR_LENGTH          128
 #define SOCKET_PATH_LEN         108
-#define SESSION_TIMEOUT         10
+#define SESSION_TIMEOUT         30	//10
 #define MAX_PYLDS_SUPPORT       2
 #define MAX_SENSOR_NUMBERS      32
-#define DEFAULT_TIMEOUT			10
+#define DEFAULT_TIMEOUT			30	//10
 #define MAX_USER_NUM			(10)
 #define MAX_SEL_RECORD			(100)
 #define MAX_ID_STR_LEN  		16

+ 4 - 4
app/goahead-3.6.5/src/auth.c

@@ -560,7 +560,7 @@ static void loginServiceProc(Webs *wp)
          cJSON_AddNumberToObject(root, "code", 201);
     }
     char *loginStatus = (char*) websGetSessionVar(wp, "loginStatus", 0);
-    printf(">>>>>>>>>>>>>>>>>%s<<<<<<<<<<<11<<<<<<<<<<loginStatus\n", loginStatus);
+    //printf(">>>>>>>>>>>>>>>>>%s<<<<<<<<<<<11<<<<<<<<<<loginStatus\n", loginStatus);
      pStr = cJSON_PrintUnformatted(root);
 
     printf("---> cJSON Str: %d \n%s\n", strlen(pStr), pStr);
@@ -572,9 +572,9 @@ static void loginServiceProc(Webs *wp)
     if(ret < 0)
         printf("websWrite error\n");
     
-    ret = websFlush(wp, 1); //wait for all data to be written to the socket 
-    if(ret != 1)
-        printf("websFlush error, ret = %d\n", ret);
+    ret = websFlush(wp, 0); //wait for all data to be written to the socket 
+ //   if(ret != 1)
+ //       printf("websFlush error, ret = %d\n", ret);
     
     websDone(wp);
 

+ 2 - 2
app/goahead-3.6.5/src/goahead.c

@@ -126,8 +126,8 @@ MAIN(goahead, int argc, char **argv, char **envp)
     if (argc > argind) {
         documents = argv[argind++];
     }
-    printf("---> initPlatform\n");
-    initPlatform();
+ //   printf("---> initPlatform\n");
+    initPlatform(); //注册信号
     printf("---> websOpen\n");
 //    printf(">>>>>>>>>>>>>>>>>>>>>>>>>>2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
     if (websOpen(documents, route) < 0) {

+ 1 - 1
app/goahead-3.6.5/src/libipmi/src/libipmi_session.c

@@ -215,7 +215,7 @@ Closes the connection with BMC
 ----------------------------------------------------------------------*/
 uint16_t LIBIPMI_CloseSession( IPMI20_UDS_SESSION_T *pUDSSession )
 {
-    printf("LIBIPMI_CloseSession\n");
+    printf("LIBIPMI_CloseSession %d\n", pUDSSession->hUDSInfo.hSocket);
     close(pUDSSession->hUDSInfo.hSocket);
     /* reset the connected flag */
     pUDSSession->hUDSInfo.byIsConnected = 0;

+ 2 - 0
app/goahead-3.6.5/src/socket.c

@@ -35,6 +35,7 @@ PUBLIC int socketOpen()
 
 #if ME_WIN_LIKE
 {
+    printf("===> ME_WIN_LIKE\n");
     WSADATA     wsaData;
     if (WSAStartup(MAKEWORD(1,1), &wsaData) != 0) {
         return -1;
@@ -125,6 +126,7 @@ PUBLIC int socketListen(char *ip, int port, SocketAccept accept, int flags)
         socketFree(sid);
         return -1;
     }
+    printf("---> web socketListen.socket = %d\n", sp->sock);
     socketHighestFd = max(socketHighestFd, sp->sock);
 
 #if ME_COMPILER_HAS_FCNTL

+ 1 - 0
app/goahead-3.6.5/test/test.c

@@ -250,6 +250,7 @@ static void usage() {
 void initPlatform() 
 {
 #if ME_UNIX_LIKE
+    printf("===> ME_UNIX_LIKE\n");
     signal(SIGINT, sigHandler);
     signal(SIGTERM, sigHandler);
     signal(SIGKILL, sigHandler);