Hi ,
when i make a data call i get the event “ADL_RET_ERR_ALREADY_SUBSCRIBED”. what is the reason for this ? actually in user guide its mentioned that the GSM flow will be unsubscribed automatically once the call hangs.
find my code for ur analysis
void Receive_call()
{
s8 Temp_g_cFCMGsmhandle;
memset(aPassStr,0,100);
memset(aLocalBuff,0,100);
g_ucAnDSubscribed = 0;
if(OK == adl_adUnsubscribe(pstTempAndSt->AnDHdls));
g_ucClientIntrpt = g_ucServeIntrpt = g_ucTrnsprntIntrpt = 0;
Temp_g_cFCMGsmhandle = adl_fcmSubscribe( ADL_FCM_FLOW_GSM_DATA,(adl_fcmCtrlHdlr_f)Gsm_CtrlHandler,(adl_fcmDataHdlr_f)Gsm_DataHandler );
TRACE((1,"Temp_g_cFCMGsmhandle : %d...",Temp_g_cFCMGsmhandle));
if(Temp_g_cFCMGsmhandle >= 0)
{
g_ucCallAnswerFlow = 5;
TRACE((1,"FCM_GSM is being subscribed for first time.."));
g_cFCMGsmhandle = Temp_g_cFCMGsmhandle;
}
else if(Temp_g_cFCMGsmhandle == ADL_RET_ERR_ALREADY_SUBSCRIBED)
{
g_ucCallAnswerFlow = 10;
TRACE((1,"FCM_GSM is already subscribed..%d",Temp_g_cFCMGsmhandle));
TRACE((1,"And the already subscribed handle is..%d",g_cFCMGsmhandle));
if(OK == adl_callAnswer())
TRACE((1,"adl_callAnswer() Success"));
//if(OK == adl_fcmUnsubscribe(g_cFCMGsmhandle))
//g_cFCMGsmhandle = adl_fcmSubscribe( ADL_FCM_FLOW_GSM_DATA,(adl_fcmCtrlHdlr_f)Gsm_CtrlHandler,(adl_fcmDataHdlr_f)Gsm_DataHandler );
//g_ucSubscribeonUnsubscribe = 1;
adl_fcmSendData(g_cFCMGsmhandle,"TEST1",5);
}
else if(Temp_g_cFCMGsmhandle == ADL_FCM_RET_ERROR_GSM_GPRS_ALREADY_OPENNED)
{
g_ucCallAnswerFlow = 15;
g_ucDataCallRequired = 1;
if(GPRS_Progress)
wip_bearerStop(Bearer4gprs);//adl_tmrSubscribe(FALSE,1,ADL_TMR_TYPE_100MS,(adl_tmrHandler_t)Chan_Stop_TmrHdl);
else
if(OK == adl_callAnswer())
TRACE((1,"adl_callAnswer() Success on ADL_FCM_RET_ERROR_GSM_GPRS_ALREADY_OPENNED"));
//adl_callAnswer();
TRACE((1,"FCM_GSM is already Opened..%d",Temp_g_cFCMGsmhandle));
//adl_fcmSendData(g_cFCMGsmhandle,"TEST2",5);
}
}