Bladeren bron

Fix authentication URL...

Adam Ierymenko 4 jaren geleden
bovenliggende
commit
810e2a761f
2 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 2 1
      node/Network.cpp
  2. 2 2
      node/Network.hpp

+ 2 - 1
node/Network.cpp

@@ -1022,6 +1022,7 @@ int Network::setConfiguration(void *tPtr,const NetworkConfig &nconf,bool saveToD
 		}
 
 		_portError = RR->node->configureVirtualNetworkPort(tPtr,_id,&_uPtr,(oldPortInitialized) ? ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE : ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_UP,&ctmp);
+		_authenticationURL = nconf.authenticationURL;
 
 		if (saveToDisk) {
 			Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> *const d = new Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY>();
@@ -1432,7 +1433,7 @@ void Network::_externalConfig(ZT_VirtualNetworkConfig *ec) const
 
 	memcpy(&ec->dns, &_config.dns, sizeof(ZT_VirtualNetworkDNS));
 
-	Utils::scopy(ec->authenticationURL, sizeof(ec->authenticationURL), _config.authenticationURL);
+	Utils::scopy(ec->authenticationURL, sizeof(ec->authenticationURL), _authenticationURL.c_str());
 	ec->authenticationExpiryTime = _config.authenticationExpiryTime;
 }
 

+ 2 - 2
node/Network.hpp

@@ -227,7 +227,7 @@ public:
 	{
 		Mutex::Lock _l(_lock);
 		_netconfFailure = NETCONF_FAILURE_AUTHENTICATION_REQUIRED;
-		_authorizationURL = (url) ? url : "";
+		_authenticationURL = (url) ? url : "";
 	}
 
 	/**
@@ -449,7 +449,7 @@ private:
 		NETCONF_FAILURE_AUTHENTICATION_REQUIRED
 	} _netconfFailure;
 	int _portError; // return value from port config callback
-	std::string _authorizationURL;
+	std::string _authenticationURL;
 
 	Hashtable<Address,Membership> _memberships;