From ce598c3334f768cf18e99509000f678b188ebaee Mon Sep 17 00:00:00 2001 From: "wootak.jung" Date: Fri, 12 Jul 2013 14:24:29 +0900 Subject: [PATCH] Fix , , to set rightly Change-Id: I5f4e9d7a1adfd6459b469f5ba39ae4897ec64171 --- packaging/tel-plugin-imc.spec | 2 +- src/s_network.c | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/packaging/tel-plugin-imc.spec b/packaging/tel-plugin-imc.spec index 93531b3..281d812 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.40 +Version: 0.1.41 Release: 1 Group: Development/Libraries License: Apache diff --git a/src/s_network.c b/src/s_network.c index 47f9547..0bbb5d3 100644 --- a/src/s_network.c +++ b/src/s_network.c @@ -1266,23 +1266,32 @@ Note: is supporting from R7 and above Protocol Stack. goto OUT; } else { stat = atoi(pResp); - if ((pResp = g_slist_nth_data(tokens, 1))) - lac = atoi(pResp); + if ((pResp = g_slist_nth_data(tokens, 1))) { + pResp = util_removeQuotes(pResp); + lac = strtol(pResp, NULL, 16); + g_free(pResp); + } - if ((pResp = g_slist_nth_data(tokens, 2))) - ci = atoi(pResp); - else + if ((pResp = g_slist_nth_data(tokens, 2))) { + pResp = util_removeQuotes(pResp); + ci = strtol(pResp, NULL, 16); + g_free(pResp); + } else { dbg("No ci in +CGREG"); + } if ((pResp = g_slist_nth_data(tokens, 3))) AcT = atoi(pResp); else dbg("No AcT in +CGREG"); - if ((pResp = g_slist_nth_data(tokens, 4))) - rac = atoi(pResp); - else + if ((pResp = g_slist_nth_data(tokens, 4))) { + pResp = util_removeQuotes(pResp); + rac = strtol(pResp, NULL, 16); + g_free(pResp); + } else { dbg("No rac in +CGREG"); + } } @@ -1447,13 +1456,19 @@ Note: is supporting from R7 and above Protocol Stack. goto OUT; } else { stat = atoi(pResp); - if ((pResp = g_slist_nth_data(tokens, 1))) - lac = atoi(pResp); + if ((pResp = g_slist_nth_data(tokens, 1))) { + pResp = util_removeQuotes(pResp); + lac = strtol(pResp, NULL, 16); + g_free(pResp); + } - if ((pResp = g_slist_nth_data(tokens, 2))) - ci = atoi(pResp); - else + if ((pResp = g_slist_nth_data(tokens, 2))) { + pResp = util_removeQuotes(pResp); + ci = strtol(pResp, NULL, 16); + g_free(pResp); + } else { dbg("No ci in +CREG"); + } if ((pResp = g_slist_nth_data(tokens, 3))) AcT = atoi(pResp); -- 2.7.4