|
@@ -138,7 +138,7 @@ int sys_set_factory(void)
|
|
|
|
|
|
|
|
snprintf(src, sizeof(src), "%s/%s", dir, DATABASE_BAK_NAME);
|
|
snprintf(src, sizeof(src), "%s/%s", dir, DATABASE_BAK_NAME);
|
|
|
snprintf(dst, sizeof(dst), "%s/%s", dir, DATABASE_NAME);
|
|
snprintf(dst, sizeof(dst), "%s/%s", dir, DATABASE_NAME);
|
|
|
- LOGD("___ file_copy from %s to %s\n", src, dst);
|
|
|
|
|
|
|
+ LOGD("__1__ file_copy from %s to %s\n", src, dst);
|
|
|
r = file_copy(dst, src);
|
|
r = file_copy(dst, src);
|
|
|
|
|
|
|
|
if(0) {
|
|
if(0) {
|
|
@@ -148,22 +148,20 @@ int sys_set_factory(void)
|
|
|
snprintf(src, sizeof(src), "%s/%s", dir, INI_FILE_BAK_NAME);
|
|
snprintf(src, sizeof(src), "%s/%s", dir, INI_FILE_BAK_NAME);
|
|
|
snprintf(dst, sizeof(dst), "%s/%s", dir, INI_FILE_NAME);
|
|
snprintf(dst, sizeof(dst), "%s/%s", dir, INI_FILE_NAME);
|
|
|
|
|
|
|
|
- LOGD("___ file_copy from %s to %s\n", src, dst);
|
|
|
|
|
|
|
+ LOGD("__2__ file_copy from %s to %s\n", src, dst);
|
|
|
r = file_copy(dst, src);
|
|
r = file_copy(dst, src);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(r==0) {
|
|
|
|
|
#if 0
|
|
#if 0
|
|
|
- r = set_net(&DFLT_PARAS.dev._network_info, IP_V4);
|
|
|
|
|
- if(r) {
|
|
|
|
|
- LOGE("____ set_net failed\n");
|
|
|
|
|
- return -1;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ r = set_net(&DFLT_PARAS.dev._network_info, IP_V4);
|
|
|
|
|
+ if(r) {
|
|
|
|
|
+ LOGE("____ set_net failed\n");
|
|
|
|
|
+ return -1;
|
|
|
|
|
+ }
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
- LOGD("____ exit smartPDU now ...\n");
|
|
|
|
|
- exit(0);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ LOGD("____ exit smartPDU now ...\n");
|
|
|
|
|
+ exit(0);
|
|
|
|
|
|
|
|
return r;
|
|
return r;
|
|
|
}
|
|
}
|