Issue fixes, code optimizations and log update 22/53422/5
authorSuresh Kumar N <suresh.n@samsung.com>
Fri, 4 Dec 2015 17:20:39 +0000 (22:50 +0530)
committerNarasimhaiah Suresh Kumar <suresh.n@samsung.com>
Wed, 9 Dec 2015 09:32:15 +0000 (01:32 -0800)
Change-Id: I7e87d12ac4440a88ff419f8441ccc252cf735818
Signed-off-by: Suresh Kumar N <suresh.n@samsung.com>
introspection/sat.xml
src/dtapi_call.c
src/dtapi_main.c
src/dtapi_phonebook.c
src/dtapi_sap.c
src/dtapi_sat.c
src/dtapi_sat_manager.c
src/dtapi_ss.c [changed mode: 0644->0755]
src/sat_ui_support/sat_ui_support.c

index b646bf781edf0e68975237aebb9aaadb71186052..bc70d5368eb846ae9745962479916bb1f86b5fc4 100644 (file)
@@ -7,7 +7,7 @@
 
        -->
        <interface name="org.tizen.telephony.SAT">
-       
+
                <method name="GetMainMenuInfo">
                        <arg direction="out" type="i" name="result"/>
                        <arg direction="out" type="i" name="command_id"/>
                        <arg direction="out" type="v" name="icon_list"/>
                        -->
                </method>
-                                               
+
                <method name="SendUiDisplayStatus">
                        <arg direction="in" type="i" name="command_id"/>
                        <arg direction="in" type="b" name="display_status"/>
                        <arg direction="out" type="i" name="result"/>
                </method>
-               
+
                <method name="SendUserConfirm">
                        <arg direction="in" type="i" name="command_id"/>
                        <arg direction="in" type="i" name="command_type"/>
                        <arg direction="in" type="i" name="user_confirm_type"/>
                        <arg direction="in" type="v" name="additional_data"/>
                        <arg direction="out" type="i" name="result"/>
-               </method>               
-                               
+               </method>
+
                <method name="SelectMenu">
                        <arg direction="in" type="i" name="item_identifier"/>
                        <arg direction="in" type="b" name="help_request"/>
                        <arg direction="out" type="i" name="result"/>
                        <arg direction="out" type="i" name="envelop_rsp"/>
                </method>
-               
+
                <method name="DownloadEvent">
                        <arg direction="in" type="i" name="event_download_type"/>
                        <arg direction="in" type="i" name="src_device"/>
@@ -75,7 +75,7 @@
                        <arg type="v" name="icon_list"/>
                        -->
                </signal>
-               
+
                <signal name="DisplayText">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
@@ -87,9 +87,9 @@
                        <!--
                        Enable below tag if SAT icon is supported...
                        <arg type="v" name="icon_id"/>
-                       -->                     
+                       -->
                </signal>
-               
+
                <signal name="SelectItem">
                        <arg type="i" name="command_id"/>
                        <arg type="b" name="help_info"/>
                        <arg type="v" name="icon_list"/>
                        -->
                </signal>
-               
+
                <signal name="GetInkey">
                        <arg type="i" name="command_id"/>
                        <arg type="i" name="key_type"/>
                        <arg type="v" name="icon_id"/>
                        -->
                </signal>
-               
+
                <signal name="GetInput">
                        <arg type="i" name="command_id"/>
                        <arg type="i" name="input_alphabet_type"/>
                        <arg type="v" name="icon_id"/>
                        -->
                </signal>
-               
+
                <signal name="PlayTone">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
                        <arg type="i" name="tone_type"/>
                        <arg type="i" name="duration"/>
                </signal>
-                               
+
                <signal name="SendSMS">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
                        <arg type="v" name="tpdu_data"/>
                        <arg type="i" name="tpdu_data_len"/>
                </signal>
-               
+
                <signal name="SendSS">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
                        <arg type="s" name="call_number"/>
                        <arg type="i" name="duration"/>
                </signal>
-               
+
                <signal name="SetupEventList">
                        <arg type="i" name="event_cnt"/>
                        <arg type="v" name="evt_list"/>
                        <arg type="v" name="icon_id"/>
                        -->
                </signal>
-                               
+
                <signal name="OpenChannel">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
                        -->
                        <arg type="i" name="channel_id"/>
                </signal>
-                               
+
                <signal name="ReceiveData">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
                        <arg type="i" name="refresh_type"/>
                        <arg type="v" name="file_list"/>
                </signal>
-               
+
                <signal name="MoreTime">
                </signal>
-               
+
                <signal name="SendDtmf">
                        <arg type="i" name="command_id"/>
                        <arg type="s" name="text"/>
                        <arg type="s" name="dtmf_str"/>
                        <arg type="i" name="dtmf_str_len"/>
                </signal>
-               
+
                <signal name="LaunchBrowser">
                        <arg type="i" name="command_id"/>
                        <arg type="i" name="launch_type"/>
                        <arg type="v" name="icon_id"/>
                        -->
                </signal>
-               
+
                <signal name="ProvideLocalInfo">
                        <arg type="i" name="info_type"/>
                </signal>
-               
+
                <signal name="LanguageNotification">
                        <arg type="i" name="command_id"/>
                        <arg type="i" name="language"/>
                <signal name="EndProactiveSession">
                        <arg type="i" name="command_type"/>
                </signal>
-               
+
                <signal name="CallControlResult">
                        <arg type="i" name="call_ctrl_result"/>
                        <arg type="s" name="text"/>
                 </signal>
 
        </interface>
-       
+
 </node>
index 144a43e27423822bc5a7b2c6e1384f3b9955adf2..1c76dc2b764980ee8828004a885417eab0e6f4da 100644 (file)
@@ -1550,7 +1550,7 @@ gboolean dbus_plugin_call_notification(struct custom_data *ctx,
        case TNOTI_CALL_INFO_BARRED_OUTGOING: {
                int *id = (int *)data;
 
-               dbg("[%s] CALL_INFO_BARRED_INCOMING: Call handle: [%d]",
+               dbg("[%s] CALL_INFO_BARRED_OUTGOING: Call handle: [%d]",
                        cp_name, (gint)*id);
 
                telephony_call_emit_barred_outgoing(call, (gint)*id);
index 4224c5c423ab97cf39a6992e7fdf66fa6b897db4..1a75b5798d11b786e3677d9af596031cc8cce181 100644 (file)
@@ -677,8 +677,10 @@ gboolean dtapi_init(TcorePlugin *p)
        }
 
        data = calloc(1, sizeof(struct custom_data));
-       if (!data)
+       if (!data) {
+               cynara_finish(p_cynara);
                return FALSE;
+       }
 
        data->p_cynara = p_cynara;
        data->plugin = p;
index 08eb7f4aa4693424dd658b16fd733c9a275e30a4..98a027d36a405ef962e47a0d43274401df30c01e 100644 (file)
@@ -330,9 +330,9 @@ static gboolean on_phonebook_update_record(TelephonyPhonebook *phonebook,
 
        memset(&req, 0x0, sizeof(struct treq_phonebook_update_record));
 
-       dbg("[%s] pb_type[%d] index[%d] name[%s] number[%s] email[%s]",
+       dbg("[%s] pb_type[%d] index[%d] number[%s] email[%s]",
                GET_CP_NAME(invocation), type, index,
-               name, number, email1);
+               number, email1);
 
        req.index = (unsigned short)index;
        req.phonebook_type = type;
@@ -579,7 +579,8 @@ gboolean dbus_plugin_phonebook_response(struct custom_data *ctx,
                        resp_pbread->index, resp_pbread->next_index);
 
                if (resp_pbread->name_len > 0) {
-                       dbg("name:[%s] len:[%d]", resp_pbread->name, resp_pbread->name_len);
+                       tcore_util_hex_dump("contact name", resp_pbread->name_len, resp_pbread->name);
+                       dbg("len:[%d]", resp_pbread->name_len);
                        memcpy(dest_pb_name, resp_pbread->name, resp_pbread->name_len);
                }
 
index 4f83d62b7239fcc74c5ff0ffad13ae22ab288553..5826d051b855947b4d62cfb137e84f91126bef40 100644 (file)
@@ -257,11 +257,14 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        UserRequest *ur, struct dbus_request_info *dbus_info,
        enum tcore_response_command command, unsigned int data_len, const void *data)
 {
+       char *cpname = GET_CP_NAME(dbus_info->invocation);
+
        switch (command) {
        case TRESP_SAP_REQ_CONNECT: {
                const struct tresp_sap_req_connect *sap_conn = data;
 
-               dbg("dbus comm - TRESP_SAP_REQ_CONNECT");
+               dbg("[%s] TRESP_SAP_REQ_CONNECT (err[%d])",
+                       cpname, sap_conn->result);
 
                telephony_sap_complete_connect(dbus_info->interface_object,
                        dbus_info->invocation, sap_conn->status,
@@ -272,7 +275,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        case TRESP_SAP_REQ_DISCONNECT: {
                const struct tresp_sap_req_disconnect *sap_disconn = data;
 
-               dbg("dbus comm - TRESP_SAP_REQ_DISCONNECT");
+               dbg("[%s] TRESP_SAP_REQ_DISCONNECT (err[%d])",
+                       cpname, sap_disconn->result);
 
                telephony_sap_complete_disconnect(dbus_info->interface_object,
                        dbus_info->invocation, sap_disconn->result);
@@ -282,7 +286,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        case TRESP_SAP_REQ_STATUS: {
                const struct tresp_sap_req_status *sap_status = data;
 
-               dbg("dbus comm - TRESP_SAP_REQ_STATUS");
+               dbg("[%s] TRESP_SAP_REQ_STATUS (err[%d])",
+                       cpname, sap_status->result);
 
                telephony_sap_complete_get_status(dbus_info->interface_object,
                        dbus_info->invocation, sap_status->status);
@@ -296,7 +301,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
                GVariant *inner_gv = NULL;
                int i = 0;
 
-               dbg("dbus comm - TRESP_SAP_REQ_ATR");
+               dbg("[%s] TRESP_SAP_REQ_ATR (err[%d])",
+                       cpname, sap_atr->result);
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)sap_atr->atr_length; i++) {
@@ -319,7 +325,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
                GVariant *inner_gv = NULL;
                int i = 0;
 
-               dbg("dbus comm - TRESP_SAP_TRANSFER_APDU");
+               dbg("[%s] TRESP_SAP_TRANSFER_APDU (err[%d])",
+                       cpname, sap_apdu->result);
 
                g_variant_builder_init(&builder, G_VARIANT_TYPE("ay"));
                for (i = 0; i < (int)sap_apdu->resp_apdu_length; i++) {
@@ -338,7 +345,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        case TRESP_SAP_SET_PROTOCOL: {
                const struct tresp_sap_set_protocol *sap_protocol = data;
 
-               dbg("dbus comm - TRESP_SAP_SET_PROTOCOL");
+               dbg("[%s] TRESP_SAP_SET_PROTOCOL (err[%d])",
+                       cpname, sap_protocol->result);
 
                telephony_sap_complete_set_protocol(dbus_info->interface_object,
                        dbus_info->invocation, sap_protocol->result);
@@ -348,7 +356,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        case TRESP_SAP_SET_POWER: {
                const struct tresp_sap_set_power *sap_power = data;
 
-               dbg("dbus comm - TRESP_SAP_SET_POWER");
+               dbg("[%s] TRESP_SAP_SET_POWER (err[%d])",
+                       cpname, sap_power->result);
 
                telephony_sap_complete_set_power(dbus_info->interface_object,
                        dbus_info->invocation, sap_power->result);
@@ -358,7 +367,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        case TRESP_SAP_REQ_CARDREADERSTATUS: {
                const struct tresp_sap_req_cardreaderstatus *sap_reader = data;
 
-               dbg("dbus comm - TRESP_SAP_REQ_CARDREADERSTATUS");
+               dbg("[%s] TRESP_SAP_REQ_CARDREADERSTATUS (err[%d])",
+                       cpname, sap_reader->result);
 
                telephony_sap_complete_get_card_reader_status(dbus_info->interface_object,
                        dbus_info->invocation, sap_reader->result,
@@ -367,7 +377,8 @@ gboolean dbus_plugin_sap_response(struct custom_data *ctx,
        break;
 
        default:
-               err("Unhandled/Unknown Response: [0x%x]", command);
+               err("[%s] Unhandled/Unknown Response: [0x%x]",
+                       cpname, command);
        break;
        }
 
index 2ccba8a14055ec2a447888adbc3867c1d74e6274..06e90688b3d0bb1bad6c9a003a275d102ce58fff 100644 (file)
@@ -114,6 +114,7 @@ static gboolean on_sat_get_main_menu_info(TelephonySAT *sat,
        main_menu = __sat_get_main_menu(ctx, GET_CP_NAME(invocation));
        if (!main_menu) {
                err("NO Main Menu");
+               FAIL_RESPONSE(invocation, DEFAULT_MSG_REQ_FAILED);
                return TRUE;
        }
 
@@ -372,13 +373,14 @@ gboolean dbus_plugin_sat_response(struct custom_data *ctx,
        enum tcore_response_command command, unsigned int data_len, const void *data)
 {
        const struct tresp_sat_envelop_data *envelop_rsp = NULL;
+       char *cpname = GET_CP_NAME(dbus_info->invocation);
 
        switch (command) {
        case TRESP_SAT_REQ_ENVELOPE: {
                envelop_rsp = (struct tresp_sat_envelop_data *)data;
 
-               dbg("SAT_REQ_ENVELOPE - Result: [%d] Envelop sub-cmd: [%d] Envelop response: [%d]",
-                       envelop_rsp->result,
+               dbg("[%s] SAT_REQ_ENVELOPE - Result: [%d] Envelop sub-cmd: [%s] Envelop response: [%s]",
+                       cpname, envelop_rsp->result,
                        (envelop_rsp->sub_cmd == ENVELOP_MENU_SELECTION ? "MENU SELECTION" :
                        (envelop_rsp->sub_cmd == ENVELOP_EVENT_DOWNLOAD ? "EVENT DOWNLOAD" :
                        "UNKNOWN")),
@@ -398,11 +400,12 @@ gboolean dbus_plugin_sat_response(struct custom_data *ctx,
        break;
 
        case TRESP_SAT_REQ_TERMINALRESPONSE:
-               dbg("SAT_REQ_TERMINALRESPONSE");
+               dbg("[%s] SAT_REQ_TERMINALRESPONSE", cpname);
        break;
 
        default:
-               err("Unhandled/Unknown Response: [0x%x]", command);
+               err("[%s] Unhandled/Unknown Response: [0x%x]",
+                       cpname, command);
        break;
        }
 
index 8e2e264e409d00b9e8e6052d5b070a23885b21bb..de3a5e7d158939ba1e68dfac6647f2c8da8dbfa0 100644 (file)
@@ -413,27 +413,38 @@ static gboolean sat_manager_queue_peek_data_by_id(struct custom_data *ctx, struc
 
 static gboolean sat_manager_check_availiable_event_list(struct tel_sat_setup_event_list_tlv *event_list_tlv)
 {
-       gboolean rv = TRUE;
-       int local_index = 0, count = event_list_tlv->event_list.event_list_cnt;
+       gboolean rv = FALSE;
+       int local_index = 0;
+       unsigned char count = event_list_tlv->event_list.event_list_cnt;
        if(count <= 0)
-               return FALSE;
+               return rv;
 
+       /*
+        * event_list will be determined at libtcore (co_sat) according to
+        * capabilities of AP and CP.
+        */
        for (local_index = 0; local_index < count; local_index++) {
                if (event_list_tlv->event_list.evt_list[local_index] == EVENT_USER_ACTIVITY) {
                        dbg("do user activity");
+                       rv = TRUE;
                } else if (event_list_tlv->event_list.evt_list[local_index] == EVENT_IDLE_SCREEN_AVAILABLE) {
                        dbg("do idle screen");
+                       rv = TRUE;
                } else if (event_list_tlv->event_list.evt_list[local_index] == EVENT_LANGUAGE_SELECTION) {
                        dbg("do language selection");
+                       rv = TRUE;
                } else if (event_list_tlv->event_list.evt_list[local_index] == EVENT_BROWSER_TERMINATION) {
                        dbg("do browser termination");
+                       rv = TRUE;
                } else if (event_list_tlv->event_list.evt_list[local_index] == EVENT_DATA_AVAILABLE) {
                        dbg("do data available (bip)");
+                       rv = TRUE;
                } else if (event_list_tlv->event_list.evt_list[local_index] == EVENT_CHANNEL_STATUS) {
                        dbg("do channel status (bip)");
+                       rv = TRUE;
                } else {
-                       dbg("unmanaged event (%d)", event_list_tlv->event_list.evt_list[local_index]);
-                       rv = FALSE;
+                       dbg("unmanaged event by AP (%d)", event_list_tlv->event_list.evt_list[local_index]);
+                       rv = TRUE;
                }
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index f1114df..3403976
@@ -662,6 +662,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        GVariantBuilder b;
        int i = 0;
 
+       char *cpname = GET_CP_NAME(dbus_info->invocation);
+
        if (!data) {
                err("response data : 0");
                return FALSE;
@@ -671,7 +673,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_BARRING_ACTIVATE: {
                const struct tresp_ss_barring *resp = data;
 
-               dbg("receive TRESP_SS_BARRING_ACTIVATE (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_BARRING_ACTIVATE (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -694,7 +697,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_BARRING_DEACTIVATE: {
                const struct tresp_ss_barring *resp = data;
 
-               dbg("receive TRESP_SS_BARRING_DEACTIVATE (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_BARRING_DEACTIVATE (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -717,7 +721,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_BARRING_CHANGE_PASSWORD: {
                const struct tresp_ss_general *resp = data;
 
-               dbg("receive TRESP_SS_BARRING_CHANGE_PASSWORD (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_BARRING_CHANGE_PASSWORD (err[%d])",
+                       cpname, resp->err);
 
                telephony_ss_complete_change_barring_password(dbus_info->interface_object,
                        dbus_info->invocation, resp->err);
@@ -727,7 +732,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_BARRING_GET_STATUS: {
                const struct tresp_ss_barring *resp = data;
 
-               dbg("receive TRESP_SS_BARRING_GET_STATUS (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_BARRING_GET_STATUS (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -750,7 +756,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_FORWARDING_ACTIVATE: {
                const struct tresp_ss_forwarding *resp = data;
 
-               dbg("receive TRESP_SS_FORWARDING_ACTIVATE (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_FORWARDING_ACTIVATE (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -783,7 +790,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_FORWARDING_DEACTIVATE: {
                const struct tresp_ss_forwarding *resp = data;
 
-               dbg("receive TRESP_SS_FORWARDING_DEACTIVATE (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_FORWARDING_DEACTIVATE (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -816,7 +824,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_FORWARDING_REGISTER: {
                const struct tresp_ss_forwarding *resp = data;
 
-               dbg("receive TRESP_SS_FORWARDING_REGISTER (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_FORWARDING_REGISTER (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -849,7 +858,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_FORWARDING_DEREGISTER: {
                const struct tresp_ss_forwarding *resp = data;
 
-               dbg("receive TRESP_SS_FORWARDING_DEREGISTER (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_FORWARDING_DEREGISTER (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -882,7 +892,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_FORWARDING_GET_STATUS: {
                const struct tresp_ss_forwarding *resp = data;
 
-               dbg("receive TRESP_SS_FORWARDING_GET_STATUS (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_FORWARDING_GET_STATUS (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -915,7 +926,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_WAITING_ACTIVATE: {
                const struct tresp_ss_waiting *resp = data;
 
-               dbg("receive TRESP_SS_WAITING_ACTIVATE (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_WAITING_ACTIVATE (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -936,7 +948,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_WAITING_DEACTIVATE: {
                const struct tresp_ss_waiting *resp = data;
 
-               dbg("receive TRESP_SS_WAITING_DEACTIVATE (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_WAITING_DEACTIVATE (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -957,7 +970,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_WAITING_GET_STATUS: {
                const struct tresp_ss_waiting *resp = data;
 
-               dbg("receive TRESP_SS_WAITING_GET_STATUS (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_WAITING_GET_STATUS (err[%d])",
+                       cpname, resp->err);
 
                g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
                for (i = 0; i < resp->record_num; i++) {
@@ -978,7 +992,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_CLI_SET_STATUS: {
                const struct tresp_ss_set_cli *resp = data;
 
-               dbg("receive TRESP_SS_CLI_SET_STATUS (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_CLI_SET_STATUS (err[%d])",
+                       cpname, resp->err);
 
                telephony_ss_complete_set_clistatus(dbus_info->interface_object,
                        dbus_info->invocation, resp->err);
@@ -988,7 +1003,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_CLI_GET_STATUS: {
                const struct tresp_ss_cli *resp = data;
 
-               dbg("receive TRESP_SS_CLI_GET_STATUS (err[%d])", resp->err);
+               dbg("[%s] TRESP_SS_CLI_GET_STATUS (err[%d])",
+                       cpname, resp->err);
 
                telephony_ss_complete_get_clistatus(dbus_info->interface_object,
                        dbus_info->invocation, resp->err, resp->type, resp->status);
@@ -998,9 +1014,10 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        case TRESP_SS_SEND_USSD: {
                const struct tresp_ss_ussd *resp = data;
 
-               dbg("receive TRESP_SS_SEND_USSD (err[%d])", resp->err);
-               dbg("USSD - type: [0x%x] status: [0x%x] dcs: [0x%x] len: [%d] string: [%s])",
-                       resp->type, resp->status, resp->dcs, resp->len, resp->str);
+               dbg("[%s] TRESP_SS_SEND_USSD (err[%d])",
+                       cpname, resp->err);
+               dbg("[%s] USSD - type: [0x%x] status: [0x%x] dcs: [0x%x] len: [%d] string: [%s])",
+                       cpname, resp->type, resp->status, resp->dcs, resp->len, resp->str);
 
                telephony_ss_complete_send_ussd(dbus_info->interface_object,
                        dbus_info->invocation, resp->err,
@@ -1010,7 +1027,8 @@ gboolean dbus_plugin_ss_response(struct custom_data *ctx,
        break;
 
        default:
-               err("Unhandled/Unknown Response: [0x%x]", command);
+               err("[%s] Unhandled/Unknown Response: [0x%x]",
+                       cpname, command);
        break;
        }
 
index 1376d2efbdc6870b0268bad4ba258b2bb3f1e7ea..4adb15fbcdf4c553a9bb73925a8710a35dbb3c24 100644 (file)
@@ -97,10 +97,12 @@ static gboolean __dispatch_on_new_thread(gchar *name, GThreadFunc thread_cb, gpo
                return FALSE;
        }
        thread = g_thread_new(name, thread_cb, thread_data);
-       if (thread == NULL)
+       if (thread == NULL) {
                return FALSE;
-       else
+       } else {
                dbg("Thread %p is created for %s", thread, name);
+               g_thread_unref(thread);
+       }
 
        return TRUE;
 }