|
@@ -518,10 +518,17 @@ void ACMCallFSM::OnStateTrans(int iSrcState, int iDstState)
|
|
|
snprintf(strmsg, MAX_PATH,"Broadcast state from %d to %d", st1, st2);
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(strmsg);
|
|
|
|
|
|
- int ierrcode = GetFailedErrorCode(iSrcState);
|
|
|
- if (ierrcode >= 0 && ierrcode < sizeof(connect_failed_case_table)/ sizeof(char*)){
|
|
|
- evt.errinfo = CSimpleStringA2W(connect_failed_case_table[ierrcode]);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("connect failed for %s.", CSimpleStringW2A(evt.errinfo).GetData());
|
|
|
+ if (eState_Fail == st2){
|
|
|
+ int ierrcode = GetFailedErrorCode(iSrcState);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("connect_failed_case_table size is %d, and ierrcode = %d.", sizeof(connect_failed_case_table)/ sizeof(char*), ierrcode);
|
|
|
+ if (ierrcode >= 0 && ierrcode < sizeof(connect_failed_case_table)/ sizeof(char*)){
|
|
|
+ evt.errinfo = CSimpleStringA2W(connect_failed_case_table[ierrcode]);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("connect failed for %s.", CSimpleStringW2A(evt.errinfo).GetData());
|
|
|
+ }
|
|
|
+
|
|
|
+ char strerrmsg[MAX_PATH] = {0};
|
|
|
+ snprintf(strerrmsg, MAX_PATH, "connect failed for %s and last state is %d, and current src state is %d.",CSimpleStringW2A(evt.errinfo).GetData(), m_iFailedLastState, iSrcState);
|
|
|
+ LogWarn(Severity_Middle, Error_Debug, LOG_WARN_COUNTERCONNECT_CONNECT_FAILED, strerrmsg);
|
|
|
}
|
|
|
|
|
|
SpSendBroadcast(GetEntityBase()->GetFunction(), SP_MSG_OF(PhoneState), SP_MSG_SIG_OF(PhoneState), evt);
|
|
@@ -538,12 +545,6 @@ void ACMCallFSM::OnStateTrans(int iSrcState, int iDstState)
|
|
|
LogWarn(Severity_Low, Error_Debug, LOG_WARN_COUNTERCONNECT_CONNECT_SUCCESS, "connect success!");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if (eState_Fail == st1 && eState_Offline == st2){
|
|
|
- char strmsg[MAX_PATH] = {0};
|
|
|
- snprintf(strmsg, MAX_PATH, "connect failed for %s and last state is %d, and current src state is %d.",CSimpleStringW2A(evt.errinfo).GetData(), m_iFailedLastState, iSrcState);
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_WARN_COUNTERCONNECT_CONNECT_FAILED, strmsg);
|
|
|
- }
|
|
|
}
|
|
|
SetCallState(st2);
|
|
|
GetEntityBase()->GetFunction()->SetUserDefineState(st2+USER_SIP_OFFLINE);
|