优化demo代码解决NW部分参数处理错误

Change-Id: I4db3c717b535160ff7dc12bc9723d0d03ef303e8
diff --git a/mbtk/mbtk_rild/src/mbtk_info_server.c b/mbtk/mbtk_rild/src/mbtk_info_server.c
old mode 100644
new mode 100755
index 5fca1ea..5a2e721
--- a/mbtk/mbtk_rild/src/mbtk_info_server.c
+++ b/mbtk/mbtk_rild/src/mbtk_info_server.c
@@ -61,6 +61,8 @@
 static char server_ready_status = 0;
 //mbtk wyq for server_ready_status add end
 
+static mbtk_signal_info_t signal_globe;
+
 
 /*
 AT*POWERIND=0"
@@ -5675,6 +5677,26 @@
     }
 }
 
+static void signal_state_change(void *data, int data_len)
+{
+    sock_client_info_t *cli = NULL;
+    list_first(sock_client_list);
+    while ((cli = (sock_client_info_t*) list_next(sock_client_list)))
+    {
+        if(cli->ind_num > 0) {
+            int i;
+            for(i = 0; i < IND_REGISTER_MAX; i++) {
+                // Registe MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE
+                if(cli->ind_register[i] == MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE) {
+                    pack_rsp_send(cli->fd , MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE, data, data_len);
+                    break;
+                }
+            }
+        }
+    }
+}
+
+
 int urc_msg_distribute(bool async_process, info_urc_msg_id_enum msg, void *data, int data_len)
 {
 #if 0
@@ -6363,6 +6385,7 @@
         {
             // Get network state and signal.
             char buff[256] = {0};
+            uint8 data_signal[7];
             mbtk_signal_info_t signal;
             memset(&signal, 0xFF, sizeof(mbtk_signal_info_t));
             if(!req_net_signal_get(&signal, NULL)) {
@@ -6374,8 +6397,37 @@
                 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);
+                
+                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;
+
+                if( (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));
+                }
             }
-            //
             break;
         }
         default: