diff --git a/applications/cfg/cfg.c b/applications/cfg/cfg.c index 0d86cf0..dd58994 100644 --- a/applications/cfg/cfg.c +++ b/applications/cfg/cfg.c @@ -100,7 +100,7 @@ int set_cfgs(const char *k, const char * v) v = NULL; } - char tmp[30]; + char tmp[128]; get_cfgs(k,tmp); // LOG_D("v=%s-----%s",v,tmp); if (strcmp(v,tmp) == 0) { diff --git a/applications/cfg/cfg.h b/applications/cfg/cfg.h index a82736a..9b507f8 100644 --- a/applications/cfg/cfg.h +++ b/applications/cfg/cfg.h @@ -21,7 +21,7 @@ #define ENCRYTTYPE 1<<4 -#define MAX_KEY_LEN 60 +#define MAX_KEY_LEN 128 #define SECTION_TO_SEND "tosend"//待发送文件清单列表 #define SECTION_LST_FILE "lstfile"//最后缓存的文件名称 diff --git a/applications/func/func.c b/applications/func/func.c index da0af06..674f620 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -371,8 +371,12 @@ void setCommWindow(uint8_t *t, size_t len) len= len/4*4;//窗口需要成对 updateAlarm(t,len); + memset(scfg.openWindowTime,0,sizeof(scfg.openWindowTime)); memcpy(scfg.openWindowTime,t,len); - rt_sem_release(cfgUpdate); +// rt_sem_release(cfgUpdate); + char tmpstr[len*3]; + bytes2str(t, len, 10, ",", tmpstr); + set_cfgs("openWindowTime",tmpstr); // LOG_D("updated new CommWindow zone"); ack(); @@ -605,9 +609,9 @@ void updateAllSysCfg(uint8_t *cfg, size_t len) rst &= set_cfg("minTTsinal",scfg.minTTsinal); rst &= set_cfg("timeout",scfg.timeout); - char tmpstr[sizeof(scfg.openWindowTime)*4]; - bytes2str(scfg.openWindowTime, 8, 10, ",", tmpstr); - rst &= set_cfgs("openWindowTime",tmpstr); +// char tmpstr[sizeof(scfg.openWindowTime)*3]; +// bytes2str(scfg.openWindowTime, sizeof(scfg.openWindowTime), 10, ",", tmpstr); +// rst &= set_cfgs("openWindowTime",tmpstr); rst &= set_cfg("maxSizePerFile", scfg.maxSizePerFile); diff --git a/applications/log2file.c b/applications/log2file.c index da01d72..bbbe490 100644 --- a/applications/log2file.c +++ b/applications/log2file.c @@ -167,4 +167,4 @@ void updateDebuglogName(void) MSH_CMD_EXPORT(updateDebuglogName,更新debug日志的文件名); //MSH_CMD_EXPORT(initLogFileBackend,initLogFileBackend); -INIT_APP_EXPORT(initLogFileBackend); +//INIT_APP_EXPORT(initLogFileBackend);