Check audio_codec is null or not when build-up call_status_all 82/146382/4 accepted/tizen/unified/20170904.144441 submit/tizen/20170904.021010
authorsinikang <sinikang@samsung.com>
Mon, 28 Aug 2017 08:13:01 +0000 (17:13 +0900)
committersinikang <sinikang@samsung.com>
Wed, 30 Aug 2017 00:48:02 +0000 (09:48 +0900)
Change-Id: I9fa096ab2ce8e78a5aa750eca62b75698824b31d

packaging/tel-plugin-dbus_tapi.spec
src/dtapi_call.c

index 55dc67b..7480e6c 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 3
-%define patchlevel 85
+%define patchlevel 86
 
 Name:           tel-plugin-dbus_tapi
 Version:        %{major}.%{minor}.%{patchlevel}
index c0e7f2d..20a6aeb 100644 (file)
@@ -506,7 +506,7 @@ static gboolean on_call_get_status_all(TelephonyCall *call,
                                call_status = TCORE_CALL_STATUS_DIALING;
                        }
 
-                       if(TCORE_CALL_STATUS_MT_SETUP == call_status){
+                       if (TCORE_CALL_STATUS_MT_SETUP == call_status) {
                                dbg("MT_SETUP state but  Incoming noti not notifed to app," \
                                                "so change it to 'IDLE' ");
                                        call_status = TCORE_CALL_STATUS_IDLE;
@@ -566,7 +566,7 @@ static gboolean on_call_get_status_all(TelephonyCall *call,
                        g_variant_builder_add(&b, "{sv}", "added_to_conference",
                                g_variant_new_boolean(added_to_conference));
                        g_variant_builder_add(&b, "{sv}", "audio_codec",
-                               g_variant_new_string(audio_codec));
+                               audio_codec ? g_variant_new_string(audio_codec) : g_variant_new_string(""));
                        g_variant_builder_close(&b);
 
                        /* Next Call object */
@@ -906,7 +906,7 @@ static gboolean on_call_start_conference(TelephonyCall *call,
        g_variant_get(unpack_participant_v, "as", &iter);
 
        req.participants_list = NULL;
-       while (g_variant_iter_loop(iter, "s", &participant)&& (index < num_participants)) {
+       while (g_variant_iter_loop(iter, "s", &participant) && (index < num_participants)) {
                dbg("participant_number[%d] = [%s]", index, participant);
                req.participants_list = g_slist_append(req.participants_list, g_strdup(participant));
                index++;
@@ -925,7 +925,7 @@ static gboolean on_call_start_conference(TelephonyCall *call,
 
 static gboolean on_call_modify_participants_in_conference(TelephonyCall *call,
        GDBusMethodInvocation *invocation,
-       gint call_handle, gint type, gint num_participants ,GVariant* participants_list,  gpointer user_data)
+       gint call_handle, gint type, gint num_participants, GVariant* participants_list, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        struct treq_call_modify_participans_in_conference req = {0};
@@ -943,7 +943,7 @@ static gboolean on_call_modify_participants_in_conference(TelephonyCall *call,
        g_variant_get(unpack_participant_v, "as", &iter);
 
        req.participants_list = NULL;
-       while (g_variant_iter_loop(iter, "s", &participant)&& (index < num_participants)) {
+       while (g_variant_iter_loop(iter, "s", &participant) && (index < num_participants)) {
                dbg("participant_number[%d] = [%s]", index, participant);
                req.participants_list = g_slist_append(req.participants_list, g_strdup(participant));
                index++;
@@ -1756,7 +1756,7 @@ gboolean dbus_plugin_call_notification(struct custom_data *ctx,
                                } else if (noti->rec_info.type == CALL_REC_NUMBER_INFO) {
                                        packet_param = g_variant_new_string(noti->rec_info.data.number);
                                        param = g_variant_new("v", packet_param);
-                               } else if (noti->rec_info.type == CALL_REC_LINE_CTRL_INFO){
+                               } else if (noti->rec_info.type == CALL_REC_LINE_CTRL_INFO) {
                                        g_variant_builder_init(&b, G_VARIANT_TYPE("a{si}"));
                                        g_variant_builder_add(&b, "{si}", "polarity_included", noti->rec_info.data.line_ctrl.polarity_included);
                                        g_variant_builder_add(&b, "{si}", "toggle_mode", noti->rec_info.data.line_ctrl.toggle_mode);
@@ -1764,12 +1764,12 @@ gboolean dbus_plugin_call_notification(struct custom_data *ctx,
                                        g_variant_builder_add(&b, "{si}", "power_denial_time", noti->rec_info.data.line_ctrl.power_denial_time);
                                        packet_param = g_variant_builder_end(&b);
                                        param = g_variant_new("v", packet_param);
-                               }else {
+                               } else {
                                        err("Unknown rec info type (%d)", noti->rec_info.type);
                                        return FALSE;
                                }
-                               dbg("[ check ] TNOTI_CALL_INFO_REC : id:(%d) type:(%d)",noti->rec_info.handle, noti->rec_info.type);
-                               telephony_call_emit_call_info_rec( call, noti->rec_info.handle, noti->rec_info.type, param);
+                               dbg("[ check ] TNOTI_CALL_INFO_REC : id:(%d) type:(%d)", noti->rec_info.handle, noti->rec_info.type);
+                               telephony_call_emit_call_info_rec(call, noti->rec_info.handle, noti->rec_info.type, param);
                        } break;
 
        case TNOTI_CALL_SOUND_PATH: {
@@ -1872,7 +1872,7 @@ gboolean dbus_plugin_call_notification(struct custom_data *ctx,
        break;
 
        case TNOTI_CALL_INFO_MODIFIABLE:{
-               struct tnoti_call_info_modifiable* noti = (struct tnoti_call_info_modifiable* )data;
+               struct tnoti_call_info_modifiable* noti = (struct tnoti_call_info_modifiable*)data;
                dbg("[%s] CALL_INFO_MODIFIABLE: Call handle: [%d] modifiable: [%d]",
                        cp_name, noti->handle, noti->modifiable);