Fix svace issue 45/148845/3 accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/5.0/unified/20181102.020837 accepted/tizen/5.5/unified/20191031.015434 accepted/tizen/5.5/unified/mobile/hotfix/20201027.075518 accepted/tizen/5.5/unified/wearable/hotfix/20201027.110559 accepted/tizen/6.0/unified/20201030.113348 accepted/tizen/6.0/unified/hotfix/20201103.001244 accepted/tizen/unified/20170913.071329 submit/tizen/20170912.053101 submit/tizen_5.0/20181101.000004 submit/tizen_5.5/20191031.000005 submit/tizen_5.5_mobile_hotfix/20201026.185105 submit/tizen_5.5_wearable_hotfix/20201026.184305 submit/tizen_6.0/20201029.205105 submit/tizen_6.0_hotfix/20201102.192505 submit/tizen_6.0_hotfix/20201103.114805 tizen_5.5.m2_release tizen_6.0.m2_release
authorsinikang <sinikang@samsung.com>
Mon, 11 Sep 2017 04:52:31 +0000 (13:52 +0900)
committersinikang <sinikang@samsung.com>
Tue, 12 Sep 2017 02:34:18 +0000 (11:34 +0900)
Change-Id: I177d3da05c36af60aabdfa8af5a222dd3786a0cf

packaging/tel-plugin-syspopup.spec
src/notifier.c
src/notifier_preferred_network.c

index d4682bcdf2c9270890645e847271d9a591340413..dc76d5cf74d42cdfa89d98740ea9a64d1a9cb889 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 7
+%define patchlevel 8
 
 Name:           tel-plugin-syspopup
 Version:        %{major}.%{minor}.%{patchlevel}
index 1b8b5085b20b0ba10c8aa2991c851b5058b9d05d..5b87c8c78808bca251fc96ce8c25eef5e1cfab40 100644 (file)
@@ -744,10 +744,15 @@ static void on_storage_key_callback(enum tcore_storage_key key, void *value, voi
 gboolean ui_notifier_init(TcorePlugin *plugin)
 {
        Server *s;
-       ui_noti_data *ud;
+       ui_noti_data *ud = NULL;
        guint id;
 
        ud = calloc(sizeof(ui_noti_data), 1);
+       if (ud == NULL) {
+               err("memory allocation failed");
+               return FALSE;
+       }
+
        if (tcore_plugin_link_user_data(plugin, ud) != TCORE_RETURN_SUCCESS) {
                free(ud);
                return FALSE;
index 38e9edceba648d3fe2d940cb952de34cb05aec90..8d5f376eb6d7b41a2e96e975abdff6d256fc19b0 100644 (file)
@@ -185,9 +185,11 @@ static void __apply_preferred_voice_change(TcorePlugin *plugin)
 
        if (b_set_preferred_network) {
                ui_noti_data *ud = tcore_plugin_ref_user_data(plugin);
-               /* Active call not exist, update Preferred Network value to comply Preferred Voice value */
-               dbg("call not exist - update PN to comply pv : %d", ud->default_voice_slot);
-               __set_preferred_network(modem_plgn, MODEM_INDEX_UNDECIDED, ud->default_voice_slot);
+               if (ud) {
+                       /* Active call not exist, update Preferred Network value to comply Preferred Voice value */
+                       dbg("call not exist - update PN to comply pv : %d", ud->default_voice_slot);
+                       __set_preferred_network(modem_plgn, MODEM_INDEX_UNDECIDED, ud->default_voice_slot);
+               }
        }
 }
 
@@ -266,7 +268,8 @@ static enum tcore_hook_return on_hook_call_status_change(Server *s, CoreObject *
                        dbg("ongoing call exist - sustain current perferred network state");
                } else {/* if not exist - update PN to comply PV */
                        ui_noti_data *ud = tcore_plugin_ref_user_data((TcorePlugin*)user_data);
-                       __set_preferred_network(modem_plgn, MODEM_INDEX_UNDECIDED, ud->default_voice_slot);
+                       if (ud)
+                               __set_preferred_network(modem_plgn, MODEM_INDEX_UNDECIDED, ud->default_voice_slot);
                }
        break;