提交 4bf4f0f4 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Minimal style changes

上级 5ee6def4
......@@ -4,3 +4,4 @@
/etc/*.pem
/mediasoup-tester.sh
/cldoc/
/TODO
......@@ -4,7 +4,7 @@
namespace RTC {
enum class DTLSRole
{
NONE = 0,
NONE = 0,
SERVER = 1,
CLIENT
};
......
......@@ -5,8 +5,8 @@ namespace RTC
{
enum class FingerprintHash
{
NONE = 0,
SHA1 = 1,
NONE = 0,
SHA1 = 1,
SHA224,
SHA256,
SHA384,
......
......@@ -5,7 +5,7 @@ namespace RTC
{
enum class SRTPProfile
{
NONE = 0,
NONE = 0,
AES_CM_128_HMAC_SHA1_80 = 1,
AES_CM_128_HMAC_SHA1_32
};
......
......@@ -138,7 +138,7 @@ void Daemon::Daemonize()
// Close all the possible fds inherited from the ancestor process (all but
// the write side of the pipe as the daemonized process must use it).
for (int fd=3; fd<32; fd++)
for (int fd = 3; fd < 32; fd++)
{
if (fd != Daemon::statusPipe[1])
close(fd);
......
......@@ -54,7 +54,7 @@ Dispatcher::Dispatcher()
// since the first entry will be in position 1.
this->controlProtocolUnixStreamSockets.push_back(nullptr);
for (int workerId=1; workerId <= num_workers; workerId++)
for (int workerId = 1; workerId <= num_workers; workerId++)
{
int fd = Worker::GetControlProtocolRemoteSocket(workerId);
ControlProtocol::UnixStreamSocket* controlProtocolUnixStreamSocket;
......@@ -128,7 +128,7 @@ void Dispatcher::Close()
// Close the ControlProtocol UnixStream sockets.
int num_workers = Worker::CountWorkers();
for (int workerId=1; workerId <= num_workers; workerId++)
for (int workerId = 1; workerId <= num_workers; workerId++)
this->controlProtocolUnixStreamSockets[workerId]->Close();
}
......@@ -216,7 +216,7 @@ void Dispatcher::onControlProtocolMessage(ControlProtocol::TCPConnection* connec
if (relayToAllWorkers)
{
int num_workers = Worker::CountWorkers();
for (int workerId=1; workerId <= num_workers; workerId++)
for (int workerId = 1; workerId <= num_workers; workerId++)
{
ControlProtocol::UnixStreamSocket* controlProtocolUnixStreamSocket = controlProtocolUnixStreamSockets[workerId];
......
......@@ -74,7 +74,7 @@ void MediaSoup::Run()
// A vector for holding the workerId value for each thread.
std::vector<int> worker_ids;
for (int workerId=1; workerId <= Settings::configuration.numWorkers; workerId++)
for (int workerId = 1; workerId <= Settings::configuration.numWorkers; workerId++)
{
worker_ids.push_back(workerId);
Worker::SetWorker(workerId, nullptr);
......@@ -105,7 +105,7 @@ void MediaSoup::Run()
waiting.tv_sec = 0;
waiting.tv_nsec = 10000000; // 10 ms.
for (int i=1; i<=300; i++)
for (int i = 1; i <= 300; i++)
{
if (Worker::AreAllWorkersRunning())
{
......
......@@ -32,7 +32,7 @@ void OpenSSL::ClassInit()
OpenSSL::numMutexes = CRYPTO_num_locks();
for (int i=0; i<OpenSSL::numMutexes; i++)
for (int i = 0; i < OpenSSL::numMutexes; i++)
{
int err = pthread_mutex_init(&OpenSSL::mutexes[i], nullptr);
if (err)
......@@ -70,7 +70,7 @@ void OpenSSL::ClassDestroy()
sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
// Free mutexes.
for (int i=0; i<OpenSSL::numMutexes; i++)
for (int i = 0; i < OpenSSL::numMutexes; i++)
{
int err = pthread_mutex_destroy(&OpenSSL::mutexes[i]);
if (err)
......
......@@ -25,6 +25,7 @@ namespace RTC
{
RTC::Peer* peer = new RTC::Peer(this);
// TODO: this is not being freed
int* data = new int(i);
peer->SetUserData((void*)data);
......
......@@ -21,6 +21,7 @@ namespace RTC
{
MS_TRACE();
// TODO: sure I want this?
delete this;
}
} // namespace RTC
......@@ -571,7 +571,7 @@ void Settings::SetDefaultRTClistenIP(int requested_family)
if (err)
MS_ABORT("uv_interface_addresses() failed: %s", uv_strerror(err));
for (int i=0; i<num_addresses; i++)
for (int i = 0; i < num_addresses; i++)
{
uv_interface_address_t address = addresses[i];
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论