Fix bug that resulted in peer caching data being written to disk even with not allowed

This commit is contained in:
Joseph Henry
2021-01-15 14:22:39 -08:00
parent b907635779
commit 706f493f2d

View File

@@ -982,8 +982,7 @@ public:
OSUtils::ztsnprintf(dirname,sizeof(dirname),"%s" ZT_PATH_SEPARATOR_S "networks.d",_homePath.c_str());
OSUtils::ztsnprintf(p,sizeof(p),"%s" ZT_PATH_SEPARATOR_S "%.16llx.conf",dirname,(unsigned long long)id[0]);
secure = true;
}
else {
} else {
return;
}
break;
@@ -991,6 +990,8 @@ public:
if (allowPeerCaching) {
OSUtils::ztsnprintf(dirname,sizeof(dirname),"%s" ZT_PATH_SEPARATOR_S "peers.d",_homePath.c_str());
OSUtils::ztsnprintf(p,sizeof(p),"%s" ZT_PATH_SEPARATOR_S "%.10llx.peer",dirname,(unsigned long long)id[0]);
} else {
return; // Do nothing
}
break;
default: