data_call: 优化data_call功能
Change-Id: I5f640219abec6d5b4d884d49ae7163869f8267d6
diff --git a/mbtk/mbtk_ril/src/main.c b/mbtk/mbtk_ril/src/main.c
index 2c5922d..3f036e8 100755
--- a/mbtk/mbtk_ril/src/main.c
+++ b/mbtk/mbtk_ril/src/main.c
@@ -316,12 +316,22 @@
uint8 data_pdp;
data_pdp = 0; //
urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
- data_pdp = cgact_wait.cid + 100;
+ data_pdp = data[1] + 100;
urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
} else if(strStartsWith(s, "+CGEV: EPS PDN ACT ")) { // +CGEV: EPS PDN ACT <cid>
//apn_state_set(atoi(s + 19), true);
data[0] = (uint8)1;
data[1] = (uint8)atoi(s + 19);
+ } else if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) { // +CGEV: EPS PDN DEACT <cid>
+ //apn_state_set(atoi(s + 19), true);
+ data[0] = (uint8)0;
+ data[1] = (uint8)atoi(s + 20);
+
+ uint8 data_pdp;
+ data_pdp = 0; //
+ urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
+ data_pdp = data[1] + 100;
+ urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
} else if(strStartsWith(s, "+CGEV: ME PDN ACT ")) { // +CGEV: ME PDN ACT <cid>,1
//apn_state_set(atoi(s + 18), true);
data[0] = (uint8)1;
@@ -374,11 +384,9 @@
{
}
- if(cgact_wait.cid != 0)
- {
- data_pdp = cgact_wait.cid + 200;
- urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
- }
+
+ data_pdp = data[1] + 200;
+ urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
}
} else {
LOGI("No process : %s", s);
diff --git a/mbtk/mbtk_ril/src/mbtk_info_server.c b/mbtk/mbtk_ril/src/mbtk_info_server.c
index 7c92094..341c9c9 100755
--- a/mbtk/mbtk_ril/src/mbtk_info_server.c
+++ b/mbtk/mbtk_ril/src/mbtk_info_server.c
@@ -5655,6 +5655,14 @@
return;
}
+ if(act)
+ {
+ cid_active[cid] = 1;
+ }
+ else
+ {
+ cid_active[cid] = 0;
+ }
char dev[20] = {0};
sprintf(dev, "ccinet%d", cid - 1);
if(act) { // Config IP.