Commit 271cd502 authored by 陈伟灿's avatar 陈伟灿

Merge branch 'cwc' into 'master'

【修改内容】修改a133平台ccuid获取方式

See merge request chenweican/k-sdk!179
parents 97845c72 80b88e71
...@@ -119,7 +119,7 @@ static int kk_cloud_key_init(void) ...@@ -119,7 +119,7 @@ static int kk_cloud_key_init(void)
pstart = key; pstart = key;
pEnd = strstr(key,"key_"); pEnd = strstr(key,"key_");
if(pEnd != NULL){ if(pEnd != NULL){
memcpy(s_key,pEnd+4,key_len -1-(pEnd-pstart+4)); memcpy(s_key,pEnd+4,key_len-(pEnd-pstart+4));
INFO_PRINT("kk_cloud_key_init s_key:%s\n",s_key); INFO_PRINT("kk_cloud_key_init s_key:%s\n",s_key);
}else{ }else{
//_setDevice_Code(KK_CCU_ID,strlen(KK_CCU_ID)); //_setDevice_Code(KK_CCU_ID,strlen(KK_CCU_ID));
......
...@@ -716,9 +716,9 @@ MQTTAsync kk_mqtt_connect(){ ...@@ -716,9 +716,9 @@ MQTTAsync kk_mqtt_connect(){
} }
return KK_MQTT_Connect_ex(usrname,pwd,clientId,host,port); return KK_MQTT_Connect_ex(usrname,pwd,clientId,host,port);
}else{ }else{
return kk_connect_default(); return NULL;//kk_connect_default();
} }
}else{ }else{
return kk_connect_default(); return NULL;//kk_connect_default();
} }
} }
\ No newline at end of file
...@@ -367,10 +367,6 @@ cJSON *map_type_convert(cJSON *s_dataType,cJSON *s_valueRange,cJSON *value,cJSON ...@@ -367,10 +367,6 @@ cJSON *map_type_convert(cJSON *s_dataType,cJSON *s_valueRange,cJSON *value,cJSON
return NULL; return NULL;
} }
sVrg = cJSON_Print(s_valueRange); sVrg = cJSON_Print(s_valueRange);
dVrg = cJSON_Print(d_valueRange); dVrg = cJSON_Print(d_valueRange);
pVal = cJSON_Print(value); pVal = cJSON_Print(value);
......
...@@ -282,7 +282,7 @@ int kk_zb_devs_hw_ack_all(int sockfd) ...@@ -282,7 +282,7 @@ int kk_zb_devs_hw_ack_all(int sockfd)
_kk_map_dev_mutex_unlock(); _kk_map_dev_mutex_unlock();
_kk_zb_devs_hw_ack(sockfd,array); _kk_zb_devs_hw_ack(sockfd,array);
return -1; return 0;
} }
cJSON * kk_zb_dev_hw_info_build_by_deviceCode(int sockfd,const char *deviceCode,int online)// cJSON * kk_zb_dev_hw_info_build_by_deviceCode(int sockfd,const char *deviceCode,int online)//
......
...@@ -10,9 +10,6 @@ ...@@ -10,9 +10,6 @@
static kk_map_dev_ctx g_map_dev_mgr = {0}; static kk_map_dev_ctx g_map_dev_mgr = {0};
kk_map_dev_ctx *_kk_map_dev_ctx(void) kk_map_dev_ctx *_kk_map_dev_ctx(void)
{ {
return &g_map_dev_mgr; return &g_map_dev_mgr;
...@@ -57,7 +54,6 @@ void kk_map_dev_deinit(void) ...@@ -57,7 +54,6 @@ void kk_map_dev_deinit(void)
list_for_each_entry_safe(node,n,&ctx->dev_list, linked_list, kk_map_dev_node_t) { list_for_each_entry_safe(node,n,&ctx->dev_list, linked_list, kk_map_dev_node_t) {
if (node != NULL) { if (node != NULL) {
if(node->json){ if(node->json){
//printf("[delete cjson] node->json.\n"); //printf("[delete cjson] node->json.\n");
cJSON_Delete(node->json); cJSON_Delete(node->json);
...@@ -70,7 +66,8 @@ void kk_map_dev_deinit(void) ...@@ -70,7 +66,8 @@ void kk_map_dev_deinit(void)
//printf("[remove list] node->linked_list\n"); //printf("[remove list] node->linked_list\n");
dlist_del(&node->linked_list); dlist_del(&node->linked_list);
memset(node,0,sizeof(kk_map_dev_node_t)); memset(node,0,sizeof(kk_map_dev_node_t));
free(node);
node = NULL;
} }
} }
_kk_map_dev_mutex_unlock(); _kk_map_dev_mutex_unlock();
...@@ -92,9 +89,6 @@ static kk_map_dev_node_t *kk_map_dev_node_create(const char *deviceCode,const ch ...@@ -92,9 +89,6 @@ static kk_map_dev_node_t *kk_map_dev_node_create(const char *deviceCode,const ch
return NULL; return NULL;
} }
memset(node,0x0,sizeof(kk_map_dev_node_t)); memset(node,0x0,sizeof(kk_map_dev_node_t));
json = cJSON_Parse(buf); json = cJSON_Parse(buf);
if(json == NULL){ if(json == NULL){
free(buf); free(buf);
...@@ -103,7 +97,6 @@ static kk_map_dev_node_t *kk_map_dev_node_create(const char *deviceCode,const ch ...@@ -103,7 +97,6 @@ static kk_map_dev_node_t *kk_map_dev_node_create(const char *deviceCode,const ch
return NULL; return NULL;
} }
node->json = json; node->json = json;
optype = cJSON_GetObjectItem(json, OPEARTETYPE_STRING); optype = cJSON_GetObjectItem(json, OPEARTETYPE_STRING);
channel = cJSON_GetObjectItem(json, CHANNEL_STRING); channel = cJSON_GetObjectItem(json, CHANNEL_STRING);
......
...@@ -80,6 +80,7 @@ void *kk_findccu_handle(void *data) ...@@ -80,6 +80,7 @@ void *kk_findccu_handle(void *data)
char *pStart = NULL,*pEnd = NULL; char *pStart = NULL,*pEnd = NULL;
fd_set server_fd_set; fd_set server_fd_set;
int yes = 1; int yes = 1;
int count = 0;
while(1){ while(1){
sockfd = socket(AF_INET, SOCK_DGRAM, 0); sockfd = socket(AF_INET, SOCK_DGRAM, 0);
bzero(&saddr, sizeof(saddr)); bzero(&saddr, sizeof(saddr));
...@@ -104,7 +105,11 @@ void *kk_findccu_handle(void *data) ...@@ -104,7 +105,11 @@ void *kk_findccu_handle(void *data)
sockfd = -1; sockfd = -1;
break; break;
}else if(ret == 0){ }else if(ret == 0){
count++;
if(count > 30){
count = 0;
DEBUG_PRINT("UDP receiving timeout......\n");
}
}else{ }else{
if (FD_ISSET(sockfd, &server_fd_set)) if (FD_ISSET(sockfd, &server_fd_set))
{ {
......
...@@ -390,10 +390,7 @@ int kk_ccu_opcode_handle(cJSON *root) ...@@ -390,10 +390,7 @@ int kk_ccu_opcode_handle(cJSON *root)
//execute scene //execute scene
if((requester!=NULL) &&(strcmp(requester->valuestring,HJ_PROFILE)==0) && if((requester!=NULL) &&(strcmp(requester->valuestring,HJ_PROFILE)==0) &&
(strcmp(opcode->valuestring,"SWITCH")==0)){ (strcmp(opcode->valuestring,"SWITCH")==0)){
msg=scene_execute(nodeId->valuestring); msg=scene_execute(nodeId->valuestring);
kk_ipc_send_json(msg); kk_ipc_send_json(msg);
return 0; return 0;
...@@ -426,28 +423,6 @@ int kk_ccu_opcode_handle(cJSON *root) ...@@ -426,28 +423,6 @@ int kk_ccu_opcode_handle(cJSON *root)
char *node_string(int nodeId)
{
char *node = (char *)malloc(33);
memset(node,0,33);
snprintf(node,32,"%d",nodeId);
return node;
}
......
...@@ -109,43 +109,6 @@ static void kk_lan_ccuid_init(void) ...@@ -109,43 +109,6 @@ static void kk_lan_ccuid_init(void)
#endif #endif
} }
int prg_run_singleton(const char *prg)
{
int fd;
int ret;
char pid_file[256] = {0};
char pid_data[32] = {0};
struct flock fl;
if(prg==NULL){
return -1;
}
memset(pid_file,0,sizeof(pid_file));
snprintf(pid_file, sizeof(pid_file), "/var/run/%s.pid",prg);
fd = open(pid_file, O_CREAT|O_WRONLY|O_TRUNC, 0644);
if(fd<0){
return -1;
}
fl.l_type = F_WRLCK;
fl.l_start = 0;
fl.l_whence = SEEK_SET;
fl.l_len = 0;
ret = fcntl(fd,F_SETLK,&fl);
if(ret < 0){
return -1;
}
memset(pid_data,0,sizeof(pid_data));
snprintf(pid_data, sizeof(pid_data), "%d",getpid());
return write(fd,pid_data,strlen(pid_data));
}
#define SYNC_INFO_FLAG 0x01 #define SYNC_INFO_FLAG 0x01
#define SYNC_INFO_PUSH_FLAG 0x02 #define SYNC_INFO_PUSH_FLAG 0x02
static int g_sync_flag; static int g_sync_flag;
...@@ -259,7 +222,7 @@ int main(int argc, char* argv[]) ...@@ -259,7 +222,7 @@ int main(int argc, char* argv[])
} }
usleep(50); usleep(100*1000);
} }
return 0; return 0;
} }
......
...@@ -1123,7 +1123,6 @@ int kk_send_indoorAir_status(cJSON *info,const char *deviceCode) ...@@ -1123,7 +1123,6 @@ int kk_send_indoorAir_status(cJSON *info,const char *deviceCode)
return -1; return -1;
} }
cJSON *epNum = cJSON_GetObjectItem(info,"epNum"); cJSON *epNum = cJSON_GetObjectItem(info,"epNum");
if(epNum == NULL){ if(epNum == NULL){
return -1; return -1;
...@@ -1523,13 +1522,6 @@ int kk_create_syncinfo_to_sdk(cJSON *payload,int push) ...@@ -1523,13 +1522,6 @@ int kk_create_syncinfo_to_sdk(cJSON *payload,int push)
controllers = cJSON_CreateArray(); controllers = cJSON_CreateArray();
cJSON_AddItemToObject(root, "controllers", controllers); cJSON_AddItemToObject(root, "controllers", controllers);
kk_sync_devices_status_to_sdk(root); kk_sync_devices_status_to_sdk(root);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "cJSON.h" #include "cJSON.h"
#define MAX_AC_GW_AIR_NUM 5 #define MAX_AC_GW_AIR_NUM 5
#define MAX_AC_INDOOR_AIR_NUM 16 #define MAX_AC_INDOOR_AIR_NUM 64
#define AIR_AC_INDOOR_ID_SIZE 8 #define AIR_AC_INDOOR_ID_SIZE 8
#define AIR_AC_INDOOR_ROOM_ID_SIZE 24 #define AIR_AC_INDOOR_ROOM_ID_SIZE 24
......
...@@ -173,7 +173,7 @@ void *TCPServer() ...@@ -173,7 +173,7 @@ void *TCPServer()
} }
ret = select(max_fd + 1, &server_fd_set,NULL, NULL, &time_out ); ret = select(max_fd + 1, &server_fd_set,NULL, NULL, &time_out );
if(ret <= 0){ if(ret <= 0){
//DEBUG_PRINT("TCPServer:TCP receiving nothing......\n"); //INFO_PRINT("TCPServer:TCP receiving nothing......\n");
//break; //break;
}else{ }else{
if (FD_ISSET(Listenfd, &server_fd_set)) if (FD_ISSET(Listenfd, &server_fd_set))
...@@ -196,6 +196,7 @@ void *TCPServer() ...@@ -196,6 +196,7 @@ void *TCPServer()
if(s_ConnInfo[i].socketfd != -1){ if(s_ConnInfo[i].socketfd != -1){
if(i == LISTEN_MAX-1){ if(i == LISTEN_MAX-1){
DEBUG_PRINT("more then max client!!!\n"); DEBUG_PRINT("more then max client!!!\n");
break;
} }
continue; continue;
}else{ }else{
...@@ -203,7 +204,6 @@ void *TCPServer() ...@@ -203,7 +204,6 @@ void *TCPServer()
s_ConnInfo[i].socketfd = client_fd; s_ConnInfo[i].socketfd = client_fd;
memcpy(s_ConnInfo[i].ip,clientIp,strlen(clientIp)); memcpy(s_ConnInfo[i].ip,clientIp,strlen(clientIp));
index = i; index = i;
printf("index:%d\n",index);
pthread_mutex_unlock(&data_mutex); pthread_mutex_unlock(&data_mutex);
break; break;
} }
......
...@@ -66,20 +66,6 @@ cJSON * property_set(const char *productCode,const char *deviceCode,const char * ...@@ -66,20 +66,6 @@ cJSON * property_set(const char *productCode,const char *deviceCode,const char *
return root; return root;
} }
cJSON * property_report(const char *productCode,const char *deviceCode,const char *msgId,const char *version,cJSON *params)
{
cJSON *root=cJSON_CreateObject();
cJSON *info = property_info_build("/thing/event/{tsl.event.identifier}/post",productCode,deviceCode);
cJSON *payload = property_payload_build("thing.event.{tsl.event.identifier}.post",msgId,version,params);
cJSON_AddItemToObject(root,INFO_STRING,info);
cJSON_AddItemToObject(root,PAYLOAD_STRING,payload);
return root;
}
extern int kk_lan_get_ccuid(_OU_ char *device_code); extern int kk_lan_get_ccuid(_OU_ char *device_code);
cJSON *scene_payload_build(const char*method,const char *msgId,cJSON *params) cJSON *scene_payload_build(const char*method,const char *msgId,cJSON *params)
...@@ -103,8 +89,6 @@ cJSON *scene_payload_build(const char*method,const char *msgId,cJSON *params) ...@@ -103,8 +89,6 @@ cJSON *scene_payload_build(const char*method,const char *msgId,cJSON *params)
return payload; return payload;
} }
cJSON * scene_execute(const char *sceneId) cJSON * scene_execute(const char *sceneId)
{ {
char msgId[32] = {0}; char msgId[32] = {0};
...@@ -134,12 +118,10 @@ cJSON * scene_execute(const char *sceneId) ...@@ -134,12 +118,10 @@ cJSON * scene_execute(const char *sceneId)
int kk_ipc_send_json(cJSON *root) int kk_ipc_send_json(cJSON *root)
{ {
char *msg; char *msg;
if(root==NULL){ if(root==NULL){
//printf("----------------------------------------DEBUG-------------------------[%s][%d]\n",__FUNCTION__,__LINE__); //printf("----------------------------------------DEBUG-------------------------[%s][%d]\n",__FUNCTION__,__LINE__);
return -1; return -1;
} }
if(mutex==NULL){ if(mutex==NULL){
kk_new_msg_init(); kk_new_msg_init();
} }
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
cJSON *property_info_build(const char *msgtype,const char *productCode,const char *deviceCode); cJSON *property_info_build(const char *msgtype,const char *productCode,const char *deviceCode);
cJSON *property_payload_build(const char*method,const char *msgId,const char *version,cJSON *params); cJSON *property_payload_build(const char*method,const char *msgId,const char *version,cJSON *params);
cJSON * property_set(const char *productCode,const char *deviceCode,const char *msgId,const char *version,cJSON *params); cJSON * property_set(const char *productCode,const char *deviceCode,const char *msgId,const char *version,cJSON *params);
cJSON * property_report(const char *productCode,const char *deviceCode,const char *msgId,const char *version,cJSON *params);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "kk_lan_sync.h" #include "kk_lan_sync.h"
#include "kk_data_mng.h" #include "kk_data_mng.h"
#include "kk_data_handle.h" #include "kk_data_handle.h"
cJSON *old_ccu_msg_build_json(const char* nodeid,const char* opcode,const char* status,cJSON * arg) cJSON *old_ccu_msg_build_json(const char* nodeid,const char* opcode,const char* status,cJSON * arg)
{ {
cJSON *root; cJSON *root;
...@@ -24,7 +23,6 @@ cJSON *old_ccu_msg_build_json(const char* nodeid,const char* opcode,const char* ...@@ -24,7 +23,6 @@ cJSON *old_ccu_msg_build_json(const char* nodeid,const char* opcode,const char*
if(nodeid==NULL||opcode==NULL||arg==NULL) { if(nodeid==NULL||opcode==NULL||arg==NULL) {
return NULL; return NULL;
} }
root=cJSON_CreateObject(); root=cJSON_CreateObject();
if(root){ if(root){
cJSON_AddStringToObject(root, "nodeid", nodeid); cJSON_AddStringToObject(root, "nodeid", nodeid);
...@@ -64,26 +62,15 @@ int send_msg_to_module(cJSON *root) ...@@ -64,26 +62,15 @@ int send_msg_to_module(cJSON *root)
if(root==NULL){ if(root==NULL){
return -1; return -1;
} }
if((msg = cJSON_Print(root))!=NULL){ if((msg = cJSON_Print(root))!=NULL){
//debug_log(LOG_INFO_LEVEL,"[lan->module]\n%s\n",msg); //debug_log(LOG_INFO_LEVEL,"[lan->module]\n%s\n",msg);
cJSON_Minify(msg); cJSON_Minify(msg);
kk_send_data_to_sdk(msg); kk_send_data_to_sdk(msg);
free(msg); free(msg);
} }
return 0; return 0;
} }
cJSON * val_conver_new2old(cJSON *newccuItem,cJSON *oldccuItem,int syn_type) cJSON * val_conver_new2old(cJSON *newccuItem,cJSON *oldccuItem,int syn_type)
{ {
cJSON *n_value = NULL,*n_dataType = NULL,*o_dataType = NULL; cJSON *n_value = NULL,*n_dataType = NULL,*o_dataType = NULL;
...@@ -126,7 +113,6 @@ static int _kk_lan_update_device_status(int nodeId,cJSON *opcode,cJSON *arg,cons ...@@ -126,7 +113,6 @@ static int _kk_lan_update_device_status(int nodeId,cJSON *opcode,cJSON *arg,cons
memset(nodeBuff,0,sizeof(nodeBuff)); memset(nodeBuff,0,sizeof(nodeBuff));
snprintf(nodeBuff,32,"%d",nodeId); snprintf(nodeBuff,32,"%d",nodeId);
memset(valBuff,0,sizeof(valBuff)); memset(valBuff,0,sizeof(valBuff));
if(arg->type==cJSON_String){ if(arg->type==cJSON_String){
...@@ -251,11 +237,8 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -251,11 +237,8 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
cJSON *n_item = NULL,*o_item = NULL; cJSON *n_item = NULL,*o_item = NULL;
cJSON *o_valueRange = NULL,*n_valueRange = NULL; cJSON *o_valueRange = NULL,*n_valueRange = NULL;
cJSON *o_dataType = NULL,*n_dataType = NULL; cJSON *o_dataType = NULL,*n_dataType = NULL;
cJSON *opcode = NULL,*channelObj = NULL,*epNumObj = NULL; cJSON *opcode = NULL,*channelObj = NULL,*epNumObj = NULL;
cJSON *n_id = NULL; cJSON *n_id = NULL;
int o_item_size=0,n_item_size=0; int o_item_size=0,n_item_size=0;
int item_size = 0; int item_size = 0;
...@@ -276,8 +259,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -276,8 +259,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
item_size = (n_item_size>o_item_size)?o_item_size:n_item_size; item_size = (n_item_size>o_item_size)?o_item_size:n_item_size;
for(i=0;i<item_size;i++){ for(i=0;i<item_size;i++){
n_item = cJSON_GetArrayItem(newccu,i); n_item = cJSON_GetArrayItem(newccu,i);
...@@ -324,12 +305,11 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -324,12 +305,11 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
epAryEpNumObj = cJSON_GetObjectItem(epAryItem,"epNum"); epAryEpNumObj = cJSON_GetObjectItem(epAryItem,"epNum");
if(epAryEpNumObj==NULL||epAryEpNumObj->type!=cJSON_String ||channel!=atoi(epAryEpNumObj->valuestring)){ if(epAryEpNumObj==NULL||epAryEpNumObj->type!=cJSON_String ||channel!=atoi(epAryEpNumObj->valuestring)){
debug_log(LOG_DEBUG_LEVEL,"[epsAry match] next.\n"); debug_log(LOG_DEBUG_LEVEL,"[epsAry match 11] next.\n");
continue ; continue ;
} }
if((valObj=cJSON_GetObjectItem(epAryItem,n_id->valuestring))==NULL){ if((valObj=cJSON_GetObjectItem(epAryItem,n_id->valuestring))==NULL){
debug_log(LOG_DEBUG_LEVEL,"[epsAry match] next.\n"); debug_log(LOG_DEBUG_LEVEL,"[epsAry match 22] next.\n");
continue ; continue ;
}else{ }else{
mFlag = 1; mFlag = 1;
...@@ -346,7 +326,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -346,7 +326,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
} }
} }
if((nodeId = kk_lan_db_node_get(deviceCode,channel))==-1){ if((nodeId = kk_lan_db_node_get(deviceCode,channel))==-1){
debug_log(LOG_DEBUG_LEVEL,"[err] not find node.\n"); debug_log(LOG_DEBUG_LEVEL,"[err] not find node.\n");
continue; continue;
...@@ -357,18 +336,14 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -357,18 +336,14 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
debug_log(LOG_DEBUG_LEVEL,"[err] cfg file.\n"); debug_log(LOG_DEBUG_LEVEL,"[err] cfg file.\n");
continue; continue;
} }
kk_lan_replace_val_to_obj(n_item,valObj,"value"); kk_lan_replace_val_to_obj(n_item,valObj,"value");
if((args = ccu_value_convert(n_dataType,n_valueRange,o_dataType,o_valueRange,valObj))!=NULL){ if((args = ccu_value_convert(n_dataType,n_valueRange,o_dataType,o_valueRange,valObj))!=NULL){
_kk_lan_update_device_status(nodeId,opcode,args,devNode->syn_opcode); _kk_lan_update_device_status(nodeId,opcode,args,devNode->syn_opcode);
//todo : //todo :
//cJSON_Delete(args); //cJSON_Delete(args);
} }
} }
debug_log(LOG_EMERG_LEVEL,"devNode->channelNum=%d\n",devNode->channelNum); debug_log(LOG_EMERG_LEVEL,"devNode->channelNum=%d\n",devNode->channelNum);
...@@ -377,8 +352,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -377,8 +352,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
debug_log(LOG_EMERG_LEVEL,"k=%d\n",k); debug_log(LOG_EMERG_LEVEL,"k=%d\n",k);
_kk_lan_sync_device_status(deviceCode,devNode,k+1); _kk_lan_sync_device_status(deviceCode,devNode,k+1);
} }
return 0; return 0;
} }
...@@ -397,7 +370,6 @@ static int attr_indoorAir_report(cJSON *params,const char *deviceCode) ...@@ -397,7 +370,6 @@ static int attr_indoorAir_report(cJSON *params,const char *deviceCode)
}else{ }else{
int epsize = cJSON_GetArraySize(epsAry); int epsize = cJSON_GetArraySize(epsAry);
for(k = 0; k < epsize; k++){ for(k = 0; k < epsize; k++){
char tmpIdx[4] = {0};
cJSON *infoItem = cJSON_GetArrayItem(epsAry,k); cJSON *infoItem = cJSON_GetArrayItem(epsAry,k);
if(infoItem == NULL) continue; if(infoItem == NULL) continue;
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
#define KK_DEVICESECRET_PATH "/data/local/kk/kk_deviceSecret.txt" #define KK_DEVICESECRET_PATH "/data/local/kk/kk_deviceSecret.txt"
#define KK_TOKEN_PATH "/data/local/kk/kk_token.txt" #define KK_TOKEN_PATH "/data/local/kk/kk_token.txt"
#define KK_DEVICE_MAP_FILE_PATH "/data/local/kk/map/device_%s.json" #define KK_DEVICE_MAP_FILE_PATH "/data/local/kk/map/device_%s.json"
#define GET_CCUID_CMD "getprop ro.ccuinfo" #define GET_CCUID_CMD "cat /mnt/private/ULI/factory/ccuinfo.txt"//"getprop ro.ccuinfo"//
#define GET_KEY_CMD "getprop ro.ccuinfo" #define GET_KEY_CMD "cat /mnt/private/ULI/factory/ccuinfo.txt"
#define GET_PRODUCTID_CMD "getprop ro.product.ccu.pid" #define GET_PRODUCTID_CMD "getprop ro.product.ccu.pid"
#define KK_DB_FILE "/data/local/kk/db/kk_database.db" #define KK_DB_FILE "/data/local/kk/db/kk_database.db"
#define TSL_SUBDEVICE_PATH_FILE "/data/local/kk/tsl/product_%s.json" #define TSL_SUBDEVICE_PATH_FILE "/data/local/kk/tsl/product_%s.json"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment