Fix bug for tel_init() fail case.
authorSung Joon Won <sungjoon.won@samsung.com>
Fri, 24 Aug 2012 10:18:41 +0000 (19:18 +0900)
committerSung Joon Won <sungjoon.won@samsung.com>
Fri, 24 Aug 2012 10:18:41 +0000 (19:18 +0900)
call-engine/voice-call-engine.c
ui/src/vcui-application.c

index 8339e24dc21dc78ac2b8fa72e60191f318d28998..f00fdf86ce5090598275e1b54eef3afd7180b487 100755 (executable)
@@ -42,7 +42,7 @@ static app_cb_t *app_client_data = NULL;
 */
 gboolean vcall_engine_send_event_to_client(int event, void *pdata)
 {
-       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       CALL_ENG_DEBUG(ENG_DEBUG, "app_client_data(0x%x)..",app_client_data);
        if (app_client_data->cb_func != NULL) {
                CALL_ENG_DEBUG(ENG_DEBUG, "Sending Event to APP Client");
                app_client_data->cb_func(event, pdata, app_client_data->puser_data);
@@ -68,11 +68,6 @@ int vcall_engine_init(vcall_engine_app_cb pcb_func, void *puser_data)
        }
        CALL_ENG_DEBUG(ENG_DEBUG, "global_pcall_core alloctated memory:[%d],global_pcall_core(0x%x)", sizeof(call_vc_core_state_t), global_pcall_core);
 
-       if (FALSE == voicecall_core_init(global_pcall_core)) {
-               CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_core_init() failed");
-               return VCALL_ENGINE_API_FAILED;
-       }
-
        app_client_data = (app_cb_t *) calloc(1, sizeof(app_cb_t));
        if (app_client_data == NULL) {
                CALL_ENG_DEBUG(ENG_ERR, "Memory Allocation Failed");
@@ -83,6 +78,12 @@ int vcall_engine_init(vcall_engine_app_cb pcb_func, void *puser_data)
 
        CALL_ENG_DEBUG(ENG_DEBUG, "Init dbus connection");
        vc_engine_dbus_receiver_setup();
+
+       if (FALSE == voicecall_core_init(global_pcall_core)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_core_init() failed");
+               return VCALL_ENGINE_API_FAILED;
+       }
+
        return VCALL_ENGINE_API_SUCCESS;
 
 }
@@ -101,8 +102,16 @@ int vcall_engine_process_normal_call(char *number, int ct_index, gboolean b_down
        char number_after_removal[VC_PHONE_NUMBER_LENGTH_MAX] = {"\0",};
        int io_state;
 
-       if (number == NULL || pcall_engine == NULL)
+       if (number == NULL || pcall_engine == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "pcall_engine or number is NULL");
+               voicecall_core_set_status(global_pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type mbox_event_data;
+
+               memset(&mbox_event_data, 0, sizeof(mbox_event_data));
+               mbox_event_data.string_id = IDS_CALL_POP_PHONE_NOT_INITIALISED;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&mbox_event_data);
                return VCALL_ENGINE_API_FAILED;
+       }
 
        _vc_core_engine_status_set_download_call(pcall_engine, b_download_call);
 
index 6b9995c54de178e8acc81fa51928100da2304ba9..7c185a0640de3d4f3b716aed881ff80ebf6da89a 100755 (executable)
@@ -291,7 +291,7 @@ static int __vcui_app_create(void *data)
        ** Requested by Inpyo Kang
        ** This is temp fix for email UG bs proglem.. must be removed later.
        */
-       elm_config_preferred_engine_set("opengl-x11");
+       elm_config_preferred_engine_set("opengl_x11");
 
        CALL_UI_KPI("__vcui_app_create done");
        return VC_NO_ERROR;