Fix <lac>, <ci>, <rac> to set rightly 50/8450/1
authorwootak.jung <wootak.jung@samsung.com>
Fri, 12 Jul 2013 05:24:29 +0000 (14:24 +0900)
committerwootak.jung <wootak.jung@samsung.com>
Tue, 20 Aug 2013 00:28:18 +0000 (09:28 +0900)
Change-Id: I5f4e9d7a1adfd6459b469f5ba39ae4897ec64171

packaging/tel-plugin-imc.spec
src/s_network.c

index 93531b3..281d812 100644 (file)
@@ -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
index 47f9547..0bbb5d3 100644 (file)
@@ -1266,23 +1266,32 @@ Note: <Act> 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: <Act> 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);