summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJungmin Kim <jm15.kim@samsung.com>2012-09-05 22:24:00 +0900
committerJungmin Kim <jm15.kim@samsung.com>2012-09-05 22:26:37 +0900
commit6a4d45dc430270618b046030ce73d733607b1dea (patch)
treea98ce852db99083979ebf172f923a7605d92095c
parent901a4a51a62f8a88c0b2f49c5586e04ecf78be1f (diff)
downloadcall-6a4d45dc430270618b046030ce73d733607b1dea.tar.gz
call-6a4d45dc430270618b046030ce73d733607b1dea.tar.bz2
call-6a4d45dc430270618b046030ce73d733607b1dea.zip
Fixed N_SE-9138
Patch set 2: Remove white space Change-Id: I2dadc7b6a78ea9d9f50fe57815e4c3b55b131b5c
-rw-r--r--call-engine/core/include/vc-core-engine.h1
-rwxr-xr-xcall-engine/core/vc-core-engine.c25
-rwxr-xr-xcall-engine/include/voice-call-core.h4
-rwxr-xr-xcall-engine/voice-call-core.c22
4 files changed, 51 insertions, 1 deletions
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; /**<MO call end cause type */
int mo_end_call_handle; /**<MO call end call handle */
int mtcall_silent_reject_handle;
+ int mtcall_handle; /**<MT call handle for checking validation */
guint mo_redial_timer;
guint minute_minder_timer;
} call_vc_core_state_t;
- /**
+
+/**
* This struct provides a structure for call incoming info data.
*/
typedef struct _call_vc_core_incoming_info_t {
diff --git a/call-engine/voice-call-core.c b/call-engine/voice-call-core.c
index f8535ba..c64e966 100755
--- a/call-engine/voice-call-core.c
+++ b/call-engine/voice-call-core.c
@@ -51,6 +51,7 @@ gboolean mo_redial_timer_cb(void *data);
#define SET_PATH_TIMER_VALUE 50
static guint g_set_path_timer_handler = 0;
static gboolean __voicecall_core_set_path_timer_cb(gpointer puser_data);
+static gboolean __voicecall_core_check_incoming_handle(gpointer puser_data);
/* For Debug Information, Call Engine Event name string constant */
char *gszcall_engine_event[VC_ENGINE_EVENT_MAX] = {
@@ -1023,6 +1024,9 @@ static gboolean voicecall_core_cb(int event, int param1, int param2, void *param
CALL_ENG_DEBUG(ENG_DEBUG, "2nd MT call alert.");
}
voicecall_snd_play_alert(pcall_core->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;
+}
+
+
+