Add Invalid SIM SLOT handling 77/127377/3 accepted/tizen/unified/20170427.180238 submit/tizen/20170427.063133 tizen_4.0.m1_release
authorsinikang <sinikang@samsung.com>
Thu, 27 Apr 2017 06:13:56 +0000 (15:13 +0900)
committerShinhui Kang <sinikang@samsung.com>
Thu, 27 Apr 2017 06:26:17 +0000 (06:26 +0000)
Change-Id: I543da083c1baffdd777e5c510efb1f9a3e8eb9a2

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

index e9b87b06588ed3df7b75123e68679428a2ad72d7..9c90597d6ed1d3afac139271008d3646795d7b4a 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 5
+%define patchlevel 6
 
 Name:           tel-plugin-syspopup
 Version:        %{major}.%{minor}.%{patchlevel}
index 261fcd0443c71e8578ed4eb20f919e1836ed3444..1b8b5085b20b0ba10c8aa2991c851b5058b9d05d 100644 (file)
@@ -318,6 +318,11 @@ static void _handle_prop_net_manual_selection_status(TcorePlugin *p, CoreObject
        }
 
        id = __get_sim_slotid(co);
+       if (id == SLOT_ID_MAX) {
+               err("Invalid SIM SLOT ID");
+               return;
+       }
+
        value = tcore_object_ref_property(co, PROP_NET_MANUAL_SELECTION_STATUS);
        info("slot(%d), manual selection status = %s", id, value);
 
@@ -349,6 +354,11 @@ static void _handle_prop_net_manual_plmn(TcorePlugin *p, CoreObject *co)
        }
 
        id = __get_sim_slotid(co);
+       if (id == SLOT_ID_MAX) {
+               err("Invalid SIM SLOT ID");
+               return;
+       }
+
        manual_plmn = tcore_object_ref_property(co, PROP_NET_MANUAL_PLMN);
        dbg("property changed (value = %s) for slot(%d)", (manual_plmn ? manual_plmn : "Null"), id);
 
@@ -491,6 +501,10 @@ static enum tcore_hook_return on_hook_network_service_type_change(Server *s, Cor
        }
 
        id = __get_sim_slotid(source);
+       if (id == SLOT_ID_MAX) {
+               err("Invalid SIM SLOT ID");
+               return TCORE_HOOK_RETURN_CONTINUE;
+       }
        if (ud->sim_status[id] == SIM_STATUS_CARD_NOT_PRESENT ||
                ud->sim_status[id] == SIM_STATUS_UNKNOWN) {
                dbg("No SIM or Unknown");
@@ -574,6 +588,11 @@ static enum tcore_hook_return on_hook_sim_status(Server *s, CoreObject *source,
        }
 
        id = __get_sim_slotid(source);
+       if (id == SLOT_ID_MAX) {
+               err("Invalid SIM SLOT ID");
+               return TCORE_HOOK_RETURN_CONTINUE;
+       }
+
        ud->sim_status[id] = sim->sim_status;
        dbg("slot:[%d] sim_status : [0x%x]", id, ud->sim_status[id]);
 
index 51c467cf416cae0b4519b18b51046eaa6f91b738..3449fa978fd08cf3eb1e34b8e928581efcc9119f 100644 (file)
@@ -58,6 +58,11 @@ static enum tcore_hook_return on_hook_sim_status(Server *s,
        modem_plugin = tcore_object_ref_plugin(source);
 
        slot_id = __get_sim_slotid(source);
+       if (slot_id == SLOT_ID_MAX) {
+               err("Invalid SIM SLOT ID");
+               return TCORE_HOOK_RETURN_CONTINUE;
+       }
+
        other_slot_id = (slot_id == SLOT_ID_PRIMARY) ? SLOT_ID_SECONDARY : SLOT_ID_PRIMARY;
 
        sim_status = ud->sim_status[slot_id] = sim->sim_status;