From: jooseok.park Date: Thu, 11 Jul 2013 07:28:08 +0000 (+0900) Subject: bug fix for that VCONFKEY_TELEPHONY_PLMN is always 0 X-Git-Tag: submit/tizen_2.2/20130714.154350^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03e36ad18627ed0c0d9fd203effed8ec9dfa8b6c;p=framework%2Ftelephony%2Ftel-plugin-imc.git bug fix for that VCONFKEY_TELEPHONY_PLMN is always 0 - add plmn_id copy in on_response_get_serving_network() Change-Id: I555571735b5285c28aefb87a3da213cdd7ec273e --- diff --git a/packaging/tel-plugin-imc.spec b/packaging/tel-plugin-imc.spec index 429a4ef..953821a 100644 --- a/packaging/tel-plugin-imc.spec +++ b/packaging/tel-plugin-imc.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/t/tel-plugin-imc Name: tel-plugin-imc Summary: imc plugin for telephony -Version: 0.1.39 +Version: 0.1.40 Release: 1 Group: Development/Libraries License: Apache diff --git a/src/s_network.c b/src/s_network.c index 8857074..47f9547 100644 --- a/src/s_network.c +++ b/src/s_network.c @@ -1047,7 +1047,6 @@ static void on_response_get_serving_network(TcorePending *p, int data_len, const const TcoreATResponse *resp = data; UserRequest *ur; struct tresp_network_get_serving_network Tresp = {0}; - char plmn[7] = {0}; char *long_plmn_name = NULL; char *short_plmn_name = NULL; char *plmn_id = NULL; @@ -1150,7 +1149,8 @@ static void on_response_get_serving_network(TcorePending *p, int data_len, const tcore_at_tok_free(tokens); } - memcpy(Tresp.plmn, plmn, 7); + if(plmn_id) + memcpy(Tresp.plmn, plmn_id, strlen(plmn_id)); tcore_network_get_access_technology(o, &(Tresp.act)); tcore_network_get_lac(o, &(Tresp.gsm.lac)); @@ -1163,7 +1163,8 @@ static void on_response_get_serving_network(TcorePending *p, int data_len, const struct tnoti_network_change network_change; memset(&network_change, 0, sizeof(struct tnoti_network_change)); - memcpy(network_change.plmn, plmn, 7); + if(plmn_id) + memcpy(network_change.plmn, plmn_id, strlen(plmn_id)); tcore_network_get_access_technology(o, &(network_change.act)); tcore_network_get_lac(o, &(network_change.gsm.lac)); @@ -1176,7 +1177,7 @@ static void on_response_get_serving_network(TcorePending *p, int data_len, const if ((AT_COPS_MODE_DEREGISTER != network_mode) && (AT_COPS_MODE_SET_ONLY != network_mode)) { /*Network identity noti*/ - memset(¬i, 0x0, sizeof(struct tnoti_network_change)); + memset(¬i, 0x0, sizeof(struct tnoti_network_identity)); if (long_plmn_name) memcpy(noti.full_name, long_plmn_name, MIN(32, strlen(long_plmn_name))); if (short_plmn_name)