Skip to content
Snippets Groups Projects
Commit 310629ee authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez
Browse files

sipaccount: fix vector size in getSupportedCiphers()

was broken since commit ac3bf29a

Refs #66135

Change-Id: Icbfe09ce37cbd96643cd75bbb72a6cec60a26586
parent 7d5c2e63
No related branches found
No related tags found
No related merge requests found
...@@ -1542,14 +1542,13 @@ SIPAccount::getSupportedCiphers() const ...@@ -1542,14 +1542,13 @@ SIPAccount::getSupportedCiphers() const
CipherArray avail_ciphers(cipherNum); CipherArray avail_ciphers(cipherNum);
if (pj_ssl_cipher_get_availables(&avail_ciphers.front(), &cipherNum) != PJ_SUCCESS) if (pj_ssl_cipher_get_availables(&avail_ciphers.front(), &cipherNum) != PJ_SUCCESS)
RING_ERR("Could not determine cipher list on this system"); RING_ERR("Could not determine cipher list on this system");
avail_ciphers.resize(cipherNum);
// filter-out 0 ciphers
availCiphers.reserve(cipherNum); availCiphers.reserve(cipherNum);
std::copy_if(avail_ciphers.begin(), avail_ciphers.end(), for (const auto &item : avail_ciphers) {
availCiphers.begin(), if (item > 0) // 0 doesn't have a name
[](pj_ssl_cipher& item){ return item > 0; }); availCiphers.push_back(pj_ssl_cipher_name(item));
}
} }
return availCiphers; return availCiphers;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment