From 6a4d45dc430270618b046030ce73d733607b1dea Mon Sep 17 00:00:00 2001 From: Jungmin Kim Date: Wed, 5 Sep 2012 22:24:00 +0900 Subject: [PATCH] Fixed N_SE-9138 Patch set 2: Remove white space Change-Id: I2dadc7b6a78ea9d9f50fe57815e4c3b55b131b5c --- call-engine/core/include/vc-core-engine.h | 1 + call-engine/core/vc-core-engine.c | 25 +++++++++++++++++++++++++ call-engine/include/voice-call-core.h | 4 +++- call-engine/voice-call-core.c | 22 ++++++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/call-engine/core/include/vc-core-engine.h b/call-engine/core/include/vc-core-engine.h index 37b523f..453a19d 100644 --- a/call-engine/core/include/vc-core-engine.h +++ b/call-engine/core/include/vc-core-engine.h @@ -380,6 +380,7 @@ voicecall_error_t _vc_core_engine_get_sat_dtmf_hidden_mode(voicecall_engine_t *p voicecall_error_t _vc_core_engine_send_sat_response(voicecall_engine_t *pvoicecall_agent, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type); voicecall_error_t _vc_core_engine_set_to_default_values(voicecall_engine_t *pvoicecall_agent); +voicecall_error_t _vc_core_engine_check_incoming_handle(voicecall_engine_t *pvoicecall_agent, int call_id); /* Tapi response call back */ void _vc_core_engine_dial_call_resp_cb(TapiHandle *handle, int result, void *tapi_data, void *user_data); diff --git a/call-engine/core/vc-core-engine.c b/call-engine/core/vc-core-engine.c index d232cf2..be81dd3 100755 --- a/call-engine/core/vc-core-engine.c +++ b/call-engine/core/vc-core-engine.c @@ -2767,6 +2767,31 @@ voicecall_error_t _vc_core_engine_set_to_default_values(voicecall_engine_t *pvoi return ERROR_VOICECALL_NONE; } +voicecall_error_t _vc_core_engine_check_incoming_handle(voicecall_engine_t *pvoicecall_agent, int call_id) +{ + CALL_ENG_DEBUG(ENG_DEBUG, "Start Incoming handle : %d", call_id); + + call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent; + TapiResult_t error = TAPI_API_SUCCESS; + TelCallStatus_t call_status; + memset(&call_status, 0x0, sizeof(TelCallStatus_t)); + + error = tel_get_call_status(pcall_agent->tapi_handle, call_id, &call_status); + + if (error != TAPI_API_SUCCESS) { + /* If incoming call handle is not valid, terminate current incoming call */ + CALL_ENG_DEBUG(ENG_DEBUG, "tel_get_call_status Error: %d", error); + CALL_ENG_DEBUG(ENG_DEBUG, "Adding Incoming End Event to Idle Callback"); + _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_END); + + g_idle_add(__call_vc_incoming_call_end_idle_cb, pcall_agent); + return ERROR_VOICECALL_TAPI_ERROR; + } + + CALL_ENG_DEBUG(ENG_DEBUG, "End"); + return ERROR_VOICECALL_NONE; +} + void _vc_core_engine_dial_call_resp_cb(TapiHandle *handle, int result, void *tapi_data, void *user_data) { CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_engine_dial_call_resp_cb"); diff --git a/call-engine/include/voice-call-core.h b/call-engine/include/voice-call-core.h index ca8dc07..d4ccc98 100755 --- a/call-engine/include/voice-call-core.h +++ b/call-engine/include/voice-call-core.h @@ -94,10 +94,12 @@ typedef struct _call_vc_core_state_t { int mo_end_cause_type; /**papp_snd); + + pcall_core->mtcall_handle = call_handle; + g_idle_add(__voicecall_core_check_incoming_handle, pcall_core); } } } @@ -3704,3 +3708,21 @@ void voicecall_core_process_dtmf_send_status(call_vc_core_state_t *pcall_core, g __voicecall_core_handle_dtmf_ack(pcall_core, bsuccess); } +/** + * This function checks validation of incoming handle + * + * @return gboolean + * @param[in] puser_data Handle to voicecall core + */ +static gboolean __voicecall_core_check_incoming_handle(gpointer puser_data) +{ + call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data; + VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core); + + _vc_core_engine_check_incoming_handle(pcall_core->pcall_engine, pcall_core->mtcall_handle); + + return FALSE; +} + + + -- 2.7.4