问题:调用qser_nw_add_rx_msg_handler API,改变网络状态,无消息上报
原因:回调函数生效方式判断失败
解决方案:更新回调函数生效方式
影响:影响network功能模块
Change-Id: Ic51cf7c6b0d2bb7c43be3dea0d750eccdc8d8a34
diff --git a/mbtk/mbtk_rild/src/mbtk_info_server.c b/mbtk/mbtk_rild/src/mbtk_info_server.c
index 69c1b1d..57dc6ac 100755
--- a/mbtk/mbtk_rild/src/mbtk_info_server.c
+++ b/mbtk/mbtk_rild/src/mbtk_info_server.c
@@ -6610,8 +6610,8 @@
{
// Get network state and signal.
char buff[256] = {0};
- uint8 data_signal[7];
- mbtk_signal_info_t signal, tmp_signal;
+ uint8 data_signal[8];
+ mbtk_signal_info_t signal;
memset(&signal, 0xFF, sizeof(mbtk_signal_info_t));
if(!req_net_signal_get(&signal, NULL)) {
char tmp[50] = {0};
@@ -6621,45 +6621,21 @@
strftime(tmp, 50, "%F %T", tm_t);
snprintf(buff, sizeof(buff), "%s:%d,%d,%d,%d,%d,%d,%d,%d", tmp, signal.type, signal.rssi, signal.rxlev, signal.ber, signal.rscp, signal.ecno,
signal.rsrq, signal.rsrp);
- mbtk_signal_log(buff);
- memset(&tmp_signal, 0xFF, sizeof(mbtk_signal_info_t));
- tmp_signal.type = signal.type;
- tmp_signal.rssi = signal.rssi;
- tmp_signal.rxlev = signal.rxlev;
- tmp_signal.ber = signal.ber;
- tmp_signal.rscp = signal.rscp;
- tmp_signal.ecno = signal.ecno;
- tmp_signal.rsrq = signal.rsrq;
- tmp_signal.rsrp = signal.rsrp;
+ mbtk_signal_log(buff);
+ }
- if( (signal_globe.type != tmp_signal.type) || (signal_globe.rssi != tmp_signal.rssi) || (signal_globe.rxlev != tmp_signal.rxlev) ||
- (signal_globe.ber != tmp_signal.ber) || (signal_globe.rscp != tmp_signal.rscp) || (signal_globe.ecno != tmp_signal.ecno) ||
- (signal_globe.rsrq != tmp_signal.rsrq) || (signal_globe.rsrp != tmp_signal.rsrp) )
-
- {
- signal_globe.type = signal.type;
- signal_globe.rssi = signal.rssi;
- signal_globe.rxlev = signal.rxlev;
- signal_globe.ber = signal.ber;
- signal_globe.rscp = signal.rscp;
- signal_globe.ecno = signal.ecno;
- signal_globe.rsrq = signal.rsrq;
- signal_globe.rsrp = signal.rsrp;
- //ADD SIGANLE CB
- data_signal[0] = signal.type;
- data_signal[1] = signal.rssi;
- data_signal[2] = signal.rxlev;
- data_signal[3] = signal.ber;
- data_signal[4] = signal.rscp;
- data_signal[5] = signal.ecno;
- data_signal[6] = signal.rsrq;
- data_signal[7] = signal.rsrp;
- /*
- LOGE("data[0]=%d data[1]=%d data[2]=%d data[3]=%d data[4]=%d data[5]=%d data[6]=%d data[7]=%d",
- data_signal[0],data_signal[1],data_signal[2],data_signal[3],data_signal[4],data_signal[5],data_signal[6],data_signal[7]);
- */
- signal_state_change(data_signal, sizeof(data_signal));
- }
+ if(signal_globe.type != signal.type)
+ {
+ data_signal[0] = signal.type;
+ data_signal[1] = signal.rssi;
+ data_signal[2] = signal.rxlev;
+ data_signal[3] = signal.ber;
+ data_signal[4] = signal.rscp;
+ data_signal[5] = signal.ecno;
+ data_signal[6] = signal.rsrq;
+ data_signal[7] = signal.rsrp;
+ signal_globe.type = signal.type;
+ signal_state_change(data_signal, sizeof(data_signal));
}
break;
}