更新LYNQ_NW接口输出格式,优化test部分的代码格式对齐问题
Change-Id: Idcae41e8d92ee9f378d006095d275fed6c168917
diff --git a/mbtk/lynq_lib/src/lynq_network.c b/mbtk/lynq_lib/src/lynq_network.c
index f629271..6ea8325 100755
--- a/mbtk/lynq_lib/src/lynq_network.c
+++ b/mbtk/lynq_lib/src/lynq_network.c
@@ -189,13 +189,13 @@
lynq_nw_info_handle = mbtk_info_handle_get();
if(lynq_nw_info_handle)
{
- printf("creat lynq_nw_info_handle is success\n");
+ LOGI("creat lynq_nw_info_handle is success");
*ph_nw = lynq_nw_info_handle->client_fd;
g_nw_val = lynq_nw_info_handle->client_fd;
}
else
{
- printf("creat lynq_nw_info_handle is fail\n");
+ LOGE("creat lynq_nw_info_handle is fail");
return -1;
}
}
@@ -208,7 +208,7 @@
//UNUSED(h_nw);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
@@ -218,7 +218,7 @@
}
else
{
- printf("deinit lynq_nw_info_handle is fail\n");
+ LOGE("deinit lynq_nw_info_handle is fail");
return -1;
}
@@ -231,19 +231,19 @@
//UNUSED(pt_info);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
if(pt_info == NULL)
{
- printf("pt_info == NULL.\n");
+ LOGE("pt_info == NULL.");
return -1;
}
@@ -255,7 +255,7 @@
//printf("tmp_mode = [%llu]",tmp_mode);
band.net_pref = lynq_net_pre_change(FALSE, pt_info->preferred_nw_mode);
- printf("band.net_pref = [%d]\n",band.net_pref);
+ LOGI("band.net_pref = [%d] ",band.net_pref);
if(band.net_pref == 0xFF)
{
@@ -277,19 +277,19 @@
//UNUSED(pt_info);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
if(pt_info == NULL)
{
- printf("pt_info == NULL.\n");
+ LOGE("pt_info == NULL.");
return -1;
}
@@ -341,19 +341,19 @@
//UNUSED(pt_info);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
if(pt_info == NULL)
{
- printf("pt_info == NULL.\n");
+ LOGE("pt_info == NULL.");
return -1;
}
@@ -483,19 +483,19 @@
//UNUSED(pt_info);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
if(pt_info == NULL)
{
- printf("pt_info == NULL.\n");
+ LOGE("pt_info == NULL.");
return -1;
}
@@ -548,13 +548,13 @@
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
@@ -572,13 +572,13 @@
//UNUSED(pt_info);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if (pt_info == NULL)
{
- printf("QSER_NW_OOS_CONFIG_INFO_T NULL\n");
+ LOGE("QSER_NW_OOS_CONFIG_INFO_T NULL");
return -1;
}
@@ -598,7 +598,7 @@
//输入多少配置多少,可以缺省使用默认值
if (pt_info->u.full_band_scan_info.t_min < 0 || pt_info->u.full_band_scan_info.t_step < 0 || pt_info->u.full_band_scan_info.t_max < 0)
{
- printf("qser_nw_set_oos_config set time < 0 \n");
+ LOGE("qser_nw_set_oos_config set time < 0 ");
return -1;
}
else if ((pt_info->u.full_band_scan_info.t_min > 0 && pt_info->u.full_band_scan_info.t_min <= 255) && pt_info->u.full_band_scan_info.t_step == 0 && pt_info->u.full_band_scan_info.t_max == 0)
@@ -631,25 +631,25 @@
}
else
{
- printf("qser_nw_set_oos_config set Format err\n");
+ LOGE("qser_nw_set_oos_config set Format err");
return -1;
}
int err = mbtk_oos_set(lynq_nw_info_handle, &oos_info);
if (err != 0)
{
- printf("qser_nw_set_oos_config mbtk_oos_set err \n");
+ LOGE("qser_nw_set_oos_config mbtk_oos_set err");
return -1;
}
}
else if (tmp_type == QSER_NW_OOS_CFG_TYPE_FAST_SCAN)
{
- printf("Not currently supported\n");
+ LOGE("Not currently supported");
return -1;
}
else
{
- printf("type is error\n");
+ LOGE("type is error");
return -1;
}
@@ -662,7 +662,7 @@
//UNUSED(pt_info);
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
@@ -675,7 +675,7 @@
int err = mbtk_oos_get(lynq_nw_info_handle, &oos_info);
if (err != 0)
{
- printf("qser_nw_get_oos_config mbtk_oos_get err \n");
+ LOGE("qser_nw_get_oos_config mbtk_oos_get err ");
return -1;
}
/*
@@ -701,7 +701,7 @@
if (pt_info == NULL)
{
- printf("qser_nw_get_oos_config pt_info is null \n");
+ LOGE("qser_nw_get_oos_config pt_info is null ");
return -1;
}
@@ -717,13 +717,13 @@
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
@@ -736,7 +736,7 @@
*/
if (rf_mode != 4 && rf_mode != 0 && rf_mode != 1)
{
- printf("mode is error!\n");
+ LOGE("mode is error!");
return -1;
}
@@ -752,7 +752,7 @@
}
else
{
- printf("qser_nw_set_rf_mode is success\n");
+ LOGI("qser_nw_set_rf_mode is success\n");
}
return 0;
@@ -767,13 +767,13 @@
if (h_nw != g_nw_val || g_nw_val == -1)
{
- printf("handle NULL\n");
+ LOGE("handle NULL");
return -1;
}
if(lynq_nw_info_handle == NULL)
{
- printf("lynq_nw_info_handle == NULL.\n");
+ LOGE("lynq_nw_info_handle == NULL.");
return -1;
}
@@ -787,7 +787,7 @@
}
else
{
- printf("qser_nw_get_rf_mode is success\n");
+ LOGI("qser_nw_get_rf_mode is success\n");
*rf_mode = tmp_rf;
}