Additional log addition.
authorSuresh Kumar Narasimhaiah <suresh.n@samsung.com>
Mon, 18 Mar 2013 10:46:56 +0000 (16:16 +0530)
committerwootak.jung <wootak.jung@samsung.com>
Sun, 24 Mar 2013 08:10:28 +0000 (17:10 +0900)
src/sat_manager.c
src/sat_ui_support/sat_ui_support.c
src/sms.c

index 3ecc6e0bd6bdf194c0b23133f7ff01a20bddf655..47040cdc1fc83cf6889548c47b333b9c280beb45 100644 (file)
@@ -2340,9 +2340,9 @@ static gboolean _sat_manager_handle_setup_menu_result(struct custom_data *ctx, T
        tr->terminal_rsp_data.setup_menu.device_id.src = q_data.cmd_data.setupMenuInd.device_id.dest;
        tr->terminal_rsp_data.setup_menu.device_id.dest = q_data.cmd_data.setupMenuInd.device_id.src;
 
-       dbg("[SAT] resp(%d)", resp);
+       dbg("[SAT] Response: [0x%02x]", resp);
 
-       switch(resp){
+       switch (resp) {
                case RESULT_SUCCESS:
                        tr->terminal_rsp_data.setup_menu.result_type = RESULT_SUCCESS;
                        if (q_data.cmd_data.setupMenuInd.icon_id.icon_info.ics == IMAGE_CODING_SCHEME_COLOUR)
index 138b1dcfbe6c9f00af8450c75d4f6b044e7c00b1..aeeb96116da955e4414b8308903b5d10fe3df6f9 100644 (file)
@@ -535,12 +535,12 @@ static gboolean _sat_ui_support_register_key_callback(enum tcore_storage_key key
 {
        gboolean ret = FALSE;
 
-       if (!strg_vconf) {
-               dbg("strg_vconf is NULL !!");
+       if (strg_vconf == NULL) {
+               err("VCONF Storage is NULL!!!");
                return ret;
        }
 
-       dbg("set the key callback key(%d)", key);
+       dbg("Set key callback - KEY: [%d]", key);
        ret = tcore_storage_set_key_callback(strg_vconf, key, _sat_ui_support_storage_key_callback, user_data);
 
        return ret;
@@ -863,26 +863,26 @@ gboolean sat_ui_support_create_desktop_file(const gchar *title)
 
        dbg("check vconf if starter is ready.");
 
-       if (!strg_vconf) {
-               dbg("strg_vconf is NULL !!");
-               return FALSE;
+       if (strg_vconf == NULL) {
+               err("VCONF Storage is NULL!!!");
+               return ret;
        }
 
        b_launched = tcore_storage_get_int(strg_vconf, STORAGE_KEY_IDLE_SCREEN_LAUNCHED_BOOL);
-
        if(b_launched < 0) {
                dbg("tcore_storage_get_int(VCONFKEY_IDLE_SCREEN_LAUNCHED) failed");
                return FALSE;
        }
 
+       dbg("Launch: [%s]", (b_launched ? "YES" : "NO"));
        if(b_launched) {
-               dbg("idle screen is ready, create desktop file.");
+               dbg("Idle screen is Ready!!! Create Desktop file");
                ret = _sat_ui_support_create_desktop_file(title);
                if (ret)
                        return TRUE;
        }
 
-       dbg("idle screen is not launched yet, register vconf noti for starter ready. b_launched (%d)", b_launched);
+       dbg("Idle screen is NOT launched yet!!! Register VCONF notification for Starter ready");
        ret = _sat_ui_support_register_key_callback(STORAGE_KEY_IDLE_SCREEN_LAUNCHED_BOOL, (void *)title);
 
        return ret;
index 22ed1ee8850665bc87ec6481aa110de7a04aa1fe..f0bca2053cecbaaf4197bb7534be1fe8171f58fe 100644 (file)
--- a/src/sms.c
+++ b/src/sms.c
@@ -83,7 +83,7 @@ on_sms_send_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
                telephony_sms_complete_send_msg(sms, invocation, SMS_DEVICE_FAILURE);
                tcore_user_request_unref(ur);
        }
-               
+
        return  TRUE;
 }
 
@@ -144,7 +144,7 @@ on_sms_save_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
 
        g_free(decoded_sca);
        g_free(decoded_tpdu);
-       
+
        ret = tcore_communicator_dispatch_request(ctx->comm, ur);
        if (ret != TCORE_RETURN_SUCCESS) {
                telephony_sms_complete_save_msg(sms, invocation, SMS_DEVICE_FAILURE, -1);
@@ -255,7 +255,7 @@ on_sms_set_sca(TelephonySms *sms, GDBusMethodInvocation *invocation,
        } else {
                gsize length;
                guchar *decoded_sca = NULL;
-       
+
                decoded_sca = g_base64_decode(arg_dialNumber, &length);
                memcpy(&(setSca.scaInfo.diallingNum[0]), decoded_sca, SMS_SMSP_ADDRESS_LEN + 1);
 
@@ -264,7 +264,7 @@ on_sms_set_sca(TelephonySms *sms, GDBusMethodInvocation *invocation,
                tcore_user_request_set_command(ur, TREQ_SMS_SET_SCA);
 
                g_free(decoded_sca);
-               
+
                ret = tcore_communicator_dispatch_request(ctx->comm, ur);
                if (ret != TCORE_RETURN_SUCCESS) {
                        telephony_sms_complete_set_sca(sms, invocation, SMS_DEVICE_FAILURE);
@@ -330,7 +330,7 @@ on_sms_set_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
        tcore_user_request_set_command(ur, TREQ_SMS_SET_CB_CONFIG);
 
        g_free(decoded_msgId);
-       
+
        ret = tcore_communicator_dispatch_request(ctx->comm, ur);
        if (ret != TCORE_RETURN_SUCCESS) {
                telephony_sms_complete_set_cb_config(sms, invocation, SMS_DEVICE_FAILURE);
@@ -424,7 +424,7 @@ on_sms_set_delivery_report(TelephonySms *sms, GDBusMethodInvocation *invocation,
        gsize length;
        guchar *decoded_sca = NULL;
        guchar *decoded_tpdu = NULL;
-       
+
        memset(&deliveryReport, 0, sizeof(struct treq_sms_set_delivery_report));
 
        decoded_sca = g_base64_decode(arg_sca, &length);
@@ -496,7 +496,7 @@ on_sms_get_sms_params(TelephonySms *sms, GDBusMethodInvocation *invocation,
 
        ret = tcore_communicator_dispatch_request(ctx->comm, ur);
        if (ret != TCORE_RETURN_SUCCESS) {
-               telephony_sms_complete_get_sms_params(sms, invocation, SMS_DEVICE_FAILURE, 
+               telephony_sms_complete_get_sms_params(sms, invocation, SMS_DEVICE_FAILURE,
                0, 0, 0, NULL, 0, 0, -1, -1, NULL, 0, -1, -1, NULL, 0, 0, 0);
                tcore_user_request_unref(ur);
        }
@@ -551,7 +551,7 @@ on_sms_set_sms_params(TelephonySms *sms, GDBusMethodInvocation *invocation,
        setParams.params.tpSvcCntrAddr.dialNumLen = arg_svcCntrAddr_DialNumLen;
        setParams.params.tpSvcCntrAddr.typeOfNum = arg_SvcCntrAddr_Ton;
        setParams.params.tpSvcCntrAddr.numPlanId = arg_svcCntrAddr_Npi;
-       decoded_scaDialNum = g_base64_decode(arg_svcCntrAddr_DialNum, &length); 
+       decoded_scaDialNum = g_base64_decode(arg_svcCntrAddr_DialNum, &length);
        memcpy(&(setParams.params.tpSvcCntrAddr.diallingNum[0]), decoded_scaDialNum, SMS_SMSP_ADDRESS_LEN + 1);
 
        setParams.params.tpProtocolId = arg_protocolId;
@@ -613,7 +613,7 @@ on_sms_get_sms_ready_status(TelephonySms *sms, GDBusMethodInvocation *invocation
                dbg("error- co_sms is NULL");
                return FALSE;
        }
-       
+
        telephony_sms_complete_get_sms_ready_status(sms, invocation, tcore_sms_get_ready_status(co_sms));
 
        return TRUE;
@@ -646,7 +646,7 @@ gboolean dbus_plugin_setup_sms_interface(TelephonyObjectSkeleton *object, struct
        g_signal_connect(sms, "handle-get-sms-params", G_CALLBACK (on_sms_get_sms_params), ctx);
        g_signal_connect(sms, "handle-set-sms-params", G_CALLBACK (on_sms_set_sms_params), ctx);
        g_signal_connect(sms, "handle-get-sms-param-cnt", G_CALLBACK (on_sms_get_sms_param_cnt), ctx);
-       g_signal_connect(sms, "handle-get-sms-ready-status", G_CALLBACK (on_sms_get_sms_ready_status), ctx);    
+       g_signal_connect(sms, "handle-get-sms-ready-status", G_CALLBACK (on_sms_get_sms_ready_status), ctx);
 
        return TRUE;
 }
@@ -687,7 +687,7 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                case TRESP_SMS_READ_MSG: {
                        const struct tresp_sms_read_msg *resp = data;
                        gchar *sca = NULL;
-                       gchar *tpdu = NULL;                     
+                       gchar *tpdu = NULL;
 
                        dbg("receive TRESP_SMS_READ_MSG");
                        dbg("resp->result = 0x%x", resp->result);
@@ -704,12 +704,12 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                                tpdu = "";
                        }
 
-                       telephony_sms_complete_read_msg(dbus_info->interface_object, dbus_info->invocation, 
+                       telephony_sms_complete_read_msg(dbus_info->interface_object, dbus_info->invocation,
                                resp->result,
                                resp->dataInfo.simIndex,
-                               resp->dataInfo.msgStatus, 
-                               sca, 
-                               resp->dataInfo.smsData.msgLength, 
+                               resp->dataInfo.msgStatus,
+                               sca,
+                               resp->dataInfo.smsData.msgLength,
                                tpdu);
 
                        if (sca)
@@ -782,7 +782,7 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                                dbg("g_base64_encode: Failed to Enocde scaAddress.diallingNum");
                                sca = "";
                        }
-                       
+
                        telephony_sms_complete_get_sca(dbus_info->interface_object, dbus_info->invocation,
                                resp->result,
                                resp->scaAddress.typeOfNum,
@@ -826,17 +826,17 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
                                        g_variant_builder_add(&b, "{sv}", "ToMsgId", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.toMsgId));
                                } else if( resp->cbConfig.net3gppType == SMS_NETTYPE_3GPP2) {
                                        g_variant_builder_add(&b, "{sv}", "CBCategory", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbCategory));
-                                       g_variant_builder_add(&b, "{sv}", "CBLanguage", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbLanguage));                            
+                                       g_variant_builder_add(&b, "{sv}", "CBLanguage", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbLanguage));
                                } else {
                                        dbg("Unknown 3gpp type");
                                        return FALSE;
                                }
-                       
+
                                g_variant_builder_add(&b, "{sv}", "Selected", g_variant_new_byte(resp->cbConfig.msgIDs[i].net3gpp.selected));
-                       
+
                                g_variant_builder_close(&b);
                        }
-                       
+
                        result = g_variant_builder_end(&b);
 
                        telephony_sms_complete_get_cb_config(dbus_info->interface_object, dbus_info->invocation,
@@ -974,7 +974,7 @@ gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, stru
 
                        if(scaDialNum)
                                g_free(scaDialNum);
-                       
+
                        }
                        break;
 
@@ -1030,7 +1030,7 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, const char *plugi
                        const struct tnoti_sms_umts_msg *noti = data;
 
                        gchar *sca = NULL;
-                       gchar *tpdu = NULL;                     
+                       gchar *tpdu = NULL;
 
                        sca = g_base64_encode((const guchar *)&(noti->msgInfo.sca[0]), SMS_ENCODED_SCA_LEN_MAX);
                        if (sca == NULL) {
@@ -1043,7 +1043,7 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, const char *plugi
                                dbg("g_base64_encode: Failed to Enocde msgInfo.tpduData");
                                tpdu = "";
                        }
-                       
+
                        telephony_sms_emit_incomming_msg(sms,
                                sca,
                                noti->msgInfo.msgLength,
@@ -1061,7 +1061,7 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, const char *plugi
                case TNOTI_SMS_CB_INCOM_MSG: {
                        const struct tnoti_sms_cellBroadcast_msg *noti = data;
                        gchar *msgData = NULL;
-                       
+
                        msgData = g_base64_encode((const guchar *)&(noti->cbMsg.msgData[0]), SMS_CB_SIZE_MAX + 1);
                        if (msgData == NULL) {
                                dbg("g_base64_encode: Failed to Enocde cbMsg.msgData");
@@ -1082,7 +1082,7 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, const char *plugi
                case TNOTI_SMS_ETWS_INCOM_MSG: {
                        const struct tnoti_sms_etws_msg *noti = data;
                        gchar *msgData = NULL;
-                       
+
                        msgData = g_base64_encode((const guchar *)&(noti->etwsMsg.msgData[0]), SMS_ETWS_SIZE_MAX + 1);
                        if (msgData == NULL) {
                                dbg("g_base64_encode: Failed to Enocde etwsMsg.msgData");
@@ -1116,6 +1116,8 @@ gboolean dbus_plugin_sms_notification(struct custom_data *ctx, const char *plugi
                case TNOTI_SMS_DEVICE_READY: {
                        const struct tnoti_sms_ready_status *noti = data;
 
+                       dbg("SMS Device Ready: [%s]", (noti->status ? "YES" : "NO"));
+
                        telephony_sms_emit_sms_ready(sms, noti->status);
 
                        }