Skip to content
Snippets Groups Projects
Commit 2b0e6ddd authored by Rafaël Carré's avatar Rafaël Carré
Browse files

set default credentials on account creation

parent fdd3117b
No related branches found
No related tags found
No related merge requests found
...@@ -432,6 +432,16 @@ void SIPAccount::setAccountDetails (std::map<std::string, std::string> details) ...@@ -432,6 +432,16 @@ void SIPAccount::setAccountDetails (std::map<std::string, std::string> details)
setTlsRequireClientCertificate (details[TLS_REQUIRE_CLIENT_CERTIFICATE] == "true"); setTlsRequireClientCertificate (details[TLS_REQUIRE_CLIENT_CERTIFICATE] == "true");
setTlsNegotiationTimeoutSec (details[TLS_NEGOTIATION_TIMEOUT_SEC]); setTlsNegotiationTimeoutSec (details[TLS_NEGOTIATION_TIMEOUT_SEC]);
setTlsNegotiationTimeoutMsec (details[TLS_NEGOTIATION_TIMEOUT_MSEC]); setTlsNegotiationTimeoutMsec (details[TLS_NEGOTIATION_TIMEOUT_MSEC]);
if (getCredentialCount() == 0) { // credentials not set, construct 1 entry
std::vector<std::map<std::string, std::string> > v;
std::map<std::string, std::string> map;
map[USERNAME] = getUsername();
map[PASSWORD] = details[PASSWORD];
map[REALM] = "*";
v.push_back(map);
setCredentials(v);
}
} }
std::map<std::string, std::string> SIPAccount::getAccountDetails() const std::map<std::string, std::string> SIPAccount::getAccountDetails() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment