From 88bc44e23828f9dfa4e8ab820293c6a3a0d8f174 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Mon, 11 Sep 2023 19:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DRTC=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E6=97=B6=E7=B3=BB=E7=BB=9F=E5=B4=A9=E6=BA=83?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20=E6=9B=B4=E6=96=B0updateAllSysCfg?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E4=B8=8D=E5=9C=A8=E6=AD=A4=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=9B=B4=E6=96=B0RTC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/cfg/cfg.c | 2 +- applications/cfg/cfg.h | 2 +- applications/func/func.c | 12 ++++++++---- applications/log2file.c | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) 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);